Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moved definition of __shared into compiler.h
  • Loading branch information
Michael Brown committed May 2, 2005
1 parent a1f50f2 commit 60b82eb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/drivers/net/sundance.c
Expand Up @@ -48,7 +48,6 @@
#include "pci.h"
#include "timer.h"
#include "mii.h"
#include "shared.h"

#define drv_version "v1.12"
#define drv_date "2004-03-21"
Expand Down
1 change: 0 additions & 1 deletion src/drivers/net/tg3.c
Expand Up @@ -16,7 +16,6 @@
#include "pci.h"
#include "timer.h"
#include "string.h"
#include "shared.h"
#include "tg3.h"

#define SUPPORT_COPPER_PHY 1
Expand Down
17 changes: 17 additions & 0 deletions src/include/compiler.h
Expand Up @@ -71,6 +71,23 @@ __asm__ ( ".equ\tDEBUG_LEVEL, " DEBUG_SYMBOL_STR );
#define __unused __attribute__((unused))
#define __used __attribute__((used))

/*
* To save space in the binary when multiple-driver images are
* compiled, uninitialised data areas can be shared between drivers.
* This will typically be used to share statically-allocated receive
* and transmit buffers between drivers.
*
* Use as e.g.
*
* struct {
* char rx_buf[NUM_RX_BUF][RX_BUF_SIZE];
* char tx_buf[TX_BUF_SIZE];
* } my_static_data __shared;
*
*/

#define __shared __asm__ ( "_shared_bss" );

#endif /* ASSEMBLY */

#endif /* COMPILER_H */
21 changes: 0 additions & 21 deletions src/include/shared.h

This file was deleted.

0 comments on commit 60b82eb

Please sign in to comment.