Browse Source

First version

tags/v0.9.3
Michael Brown 20 years ago
parent
commit
734d2e9f2d
1 changed files with 21 additions and 0 deletions
  1. 21
    0
      src/include/shared.h

+ 21
- 0
src/include/shared.h View File

@@ -0,0 +1,21 @@
1
+#ifndef SHARED_H
2
+#define SHARED_H
3
+
4
+/*
5
+ * To save space in the binary when multiple-driver images are
6
+ * compiled, uninitialised data areas can be shared between drivers.
7
+ * This will typically be used to share statically-allocated receive
8
+ * and transmit buffers between drivers.
9
+ *
10
+ * Use as e.g.
11
+ *
12
+ *  struct {
13
+ *	char	rx_buf[NUM_RX_BUF][RX_BUF_SIZE];
14
+ *	char	tx_buf[TX_BUF_SIZE];
15
+ *  } my_static_data __shared;
16
+ *
17
+ */
18
+
19
+#define __shared __asm__ ( "_shared_bss" );
20
+
21
+#endif /* SHARED_H */

Loading…
Cancel
Save