rtm.h 982 字节
Newer Older
D
dzzxzz 已提交
1 2 3
/*
 * File      : rtm.h
 * This file is part of RT-Thread RTOS
D
dzzxzz 已提交
4
 * COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team
D
dzzxzz 已提交
5 6 7 8 9 10
 *
 * 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
 */
 
qiuyiuestc's avatar
qiuyiuestc 已提交
11 12 13 14
#ifndef __RTM_H__
#define __RTM_H__

#include <rtdef.h>
qiuyiuestc's avatar
qiuyiuestc 已提交
15
#include <rtthread.h>
qiuyiuestc's avatar
qiuyiuestc 已提交
16 17 18 19

#ifdef RT_USING_MODULE
struct rt_module_symtab
{
20 21
    void       *addr;
    const char *name;
D
dzzxzz 已提交
22
};
qiuyiuestc's avatar
qiuyiuestc 已提交
23

24 25 26 27 28 29 30 31 32 33 34
#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

qiuyiuestc's avatar
qiuyiuestc 已提交
35
#endif