From 734d2e9f2db97cbda205ef81d167193faba68c0d Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 2 May 2005 14:43:15 +0000 Subject: [PATCH] First version --- src/include/shared.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/include/shared.h diff --git a/src/include/shared.h b/src/include/shared.h new file mode 100644 index 00000000..2cad391a --- /dev/null +++ b/src/include/shared.h @@ -0,0 +1,21 @@ +#ifndef SHARED_H +#define SHARED_H + +/* + * 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 /* SHARED_H */