瀏覽代碼

First version

tags/v0.9.3
Michael Brown 20 年之前
父節點
當前提交
734d2e9f2d
共有 1 個檔案被更改,包括 21 行新增0 行删除
  1. 21
    0
      src/include/shared.h

+ 21
- 0
src/include/shared.h 查看文件

@@ -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…
取消
儲存