mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-28 16:14:20 +08:00
Merge pull request #1754 from liangyongxiang/rt-used
add RT_USED to component init and finsh shell
This commit is contained in:
+5
-5
@@ -189,13 +189,13 @@ typedef int (*init_fn_t)(void);
|
||||
const char* fn_name;
|
||||
const init_fn_t fn;
|
||||
};
|
||||
#define INIT_EXPORT(fn, level) \
|
||||
const char __rti_##fn##_name[] = #fn; \
|
||||
const struct rt_init_desc __rt_init_desc_##fn SECTION(".rti_fn."level) = \
|
||||
#define INIT_EXPORT(fn, level) \
|
||||
const char __rti_##fn##_name[] = #fn; \
|
||||
RT_USED const struct rt_init_desc __rt_init_desc_##fn SECTION(".rti_fn."level) = \
|
||||
{ __rti_##fn##_name, fn};
|
||||
#else
|
||||
#define INIT_EXPORT(fn, level) \
|
||||
const init_fn_t __rt_init_##fn SECTION(".rti_fn."level) = fn
|
||||
#define INIT_EXPORT(fn, level) \
|
||||
RT_USED const init_fn_t __rt_init_##fn SECTION(".rti_fn."level) = fn
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user