2011-09-23 13:57:31 +08:00
|
|
|
/*
|
|
|
|
* File : rtm.h
|
|
|
|
* This file is part of RT-Thread RTOS
|
2012-03-17 14:43:49 +08:00
|
|
|
* COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team
|
2011-09-23 13:57:31 +08:00
|
|
|
*
|
|
|
|
* The license and distribution terms for this file may be
|
|
|
|
* found in the file LICENSE in this distribution or at
|
|
|
|
* http://www.rt-thread.org/license/LICENSE
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
struct rt_module_symtab
|
|
|
|
{
|
2012-09-05 13:51:38 +08:00
|
|
|
void *addr;
|
|
|
|
const char *name;
|
2011-09-23 13:57:31 +08:00
|
|
|
};
|
2010-04-12 00:44:54 +08:00
|
|
|
|
2012-09-05 13:51:38 +08:00
|
|
|
#define RTM_EXPORT(symbol) \
|
|
|
|
const char __rtmsym_##symbol##_name[] = #symbol; \
|
|
|
|
const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \
|
|
|
|
{ \
|
|
|
|
(void *)&symbol, \
|
|
|
|
__rtmsym_##symbol##_name \
|
|
|
|
};
|
|
|
|
#else
|
|
|
|
#define RTM_EXPORT(symbol)
|
|
|
|
#endif
|
|
|
|
|
2010-04-12 00:44:54 +08:00
|
|
|
#endif
|