summaryrefslogtreecommitdiff
path: root/include/rtm.h
blob: 80d17ad9c7e31e999c085782082425872938af2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * File      : rtm.h
 * This file is part of RT-Thread RTOS
 * COPYRIGHT (C) 2006 - 2011, RT-Thread Development Team
 *
 * 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
 */
 
#ifndef __RTM_H__
#define __RTM_H__

#include <rtdef.h>
#include <rtthread.h>

#ifdef RT_USING_MODULE
#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

struct rt_module_symtab
{
	void *addr;
	const char *name;
};

#endif