summaryrefslogtreecommitdiff
path: root/include/rtm.h
diff options
context:
space:
mode:
authorqiuyiuestc <[email protected]>2010-04-11 16:44:54 +0000
committerqiuyiuestc <[email protected]>2010-04-11 16:44:54 +0000
commit5211e7ff8fbd9dd7737fa5c0d83b505bbba0c893 (patch)
treef552be8b7119d85590dc55987fd01c7ebc97d944 /include/rtm.h
parentca6a1a7ecbd47f45b00aac9766b8dfb572c6eade (diff)
add module feature
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@604 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'include/rtm.h')
-rw-r--r--include/rtm.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/rtm.h b/include/rtm.h
new file mode 100644
index 0000000000..596d5f7f07
--- /dev/null
+++ b/include/rtm.h
@@ -0,0 +1,24 @@
+#ifndef __RTM_H__
+#define __RTM_H__
+
+#include <rtdef.h>
+
+#ifdef RT_USING_MODULE
+#define RTM_EXPORT(symbol) \
+const char __rtmsym_##symbol##_name[] = #symbol; \
+const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \
+{ \
+ (rt_uint32_t)&symbol, \
+ __rtmsym_##symbol##_name, \
+};
+#else
+#define RTM_EXPORT(symbol)
+#endif
+
+struct rt_module_symtab
+{
+ rt_uint32_t addr;
+ const char* name;
+};
+
+#endif