rtm.h 770 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. #define RTM_EXPORT(symbol) \
  16. const char __rtmsym_##symbol##_name[] = #symbol; \
  17. const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \
  18. { \
  19. (void *)&symbol, \
  20. __rtmsym_##symbol##_name \
  21. };
  22. #else
  23. #define RTM_EXPORT(symbol)
  24. #endif
  25. struct rt_module_symtab
  26. {
  27. void *addr;
  28. const char *name;
  29. };
  30. #endif