RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
rtm.h
浏览该文件的文档.
1/*
2 * Copyright (c) 2006-2021, RT-Thread Development Team
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Change Logs:
7 * Date Author Notes
8 */
9
10#ifndef __RTM_H__
11#define __RTM_H__
12
13#include <rtdef.h>
14#include <rtthread.h>
15
16#ifdef RT_USING_MODULE
18{
19 void *addr;
20 const char *name;
21};
22
23#if defined(_MSC_VER)
24#pragma section("RTMSymTab$f",read)
25#define RTM_EXPORT(symbol) \
26__declspec(allocate("RTMSymTab$f"))const char __rtmsym_##symbol##_name[] = "__vs_rtm_"#symbol;
27#pragma comment(linker, "/merge:RTMSymTab=mytext")
28
29#elif defined(__MINGW32__)
30#define RTM_EXPORT(symbol)
31
32#else
33#define RTM_EXPORT(symbol) \
34const char __rtmsym_##symbol##_name[] rt_section(".rodata.name") = #symbol; \
35const struct rt_module_symtab __rtmsym_##symbol rt_section("RTMSymTab")= \
36{ \
37 (void *)&symbol, \
38 __rtmsym_##symbol##_name \
39};
40#endif
41
42#else
43#define RTM_EXPORT(symbol)
44#endif
45
46#endif
const char * name
定义 rtm.h:20