rtm.h 947 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * File : rtm.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. */
  10. #ifndef __RTM_H__
  11. #define __RTM_H__
  12. #include <rtdef.h>
  13. #include <rtthread.h>
  14. #ifdef RT_USING_MODULE
  15. struct rt_module_symtab
  16. {
  17. void *addr;
  18. const char *name;
  19. };
  20. #define RTM_EXPORT(symbol) \
  21. const char __rtmsym_##symbol##_name[] = #symbol; \
  22. const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \
  23. { \
  24. (void *)&symbol, \
  25. __rtmsym_##symbol##_name \
  26. };
  27. #else
  28. #define RTM_EXPORT(symbol)
  29. #endif
  30. #endif