2010-04-12 00:44:54 +08:00
|
|
|
#ifndef __RTM_H__
|
|
|
|
#define __RTM_H__
|
|
|
|
|
|
|
|
#include <rtdef.h>
|
2010-05-29 22:19:56 +08:00
|
|
|
#include <rtthread.h>
|
2010-04-12 00:44:54 +08:00
|
|
|
|
|
|
|
#ifdef RT_USING_MODULE
|
|
|
|
#define RTM_EXPORT(symbol) \
|
|
|
|
const char __rtmsym_##symbol##_name[] = #symbol; \
|
|
|
|
const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \
|
|
|
|
{ \
|
2011-05-16 09:18:43 +08:00
|
|
|
(void *)&symbol, \
|
|
|
|
__rtmsym_##symbol##_name \
|
2010-04-12 00:44:54 +08:00
|
|
|
};
|
2010-05-29 22:19:56 +08:00
|
|
|
|
2010-04-12 00:44:54 +08:00
|
|
|
#else
|
|
|
|
#define RTM_EXPORT(symbol)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct rt_module_symtab
|
|
|
|
{
|
2011-05-16 09:18:43 +08:00
|
|
|
void* addr;
|
2010-04-12 00:44:54 +08:00
|
|
|
const char* name;
|
2011-05-16 09:18:43 +08:00
|
|
|
};
|
2010-04-12 00:44:54 +08:00
|
|
|
|
|
|
|
#endif
|