symbol.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2010-03-22 Bernard first version
  9. */
  10. #include <rtthread.h>
  11. #ifdef RT_USING_FINSH
  12. #include "finsh.h"
  13. long hello(void);
  14. long version(void);
  15. long list(void);
  16. long list_thread(void);
  17. long list_sem(void);
  18. long list_mutex(void);
  19. long list_fevent(void);
  20. long list_event(void);
  21. long list_mailbox(void);
  22. long list_msgqueue(void);
  23. long list_mempool(void);
  24. long list_timer(void);
  25. #ifdef FINSH_USING_SYMTAB
  26. struct finsh_syscall *_syscall_table_begin = NULL;
  27. struct finsh_syscall *_syscall_table_end = NULL;
  28. struct finsh_sysvar *_sysvar_table_begin = NULL;
  29. struct finsh_sysvar *_sysvar_table_end = NULL;
  30. #else
  31. struct finsh_syscall _syscall_table[] =
  32. {
  33. {"hello", hello},
  34. {"version", version},
  35. {"list", list},
  36. {"list_thread", list_thread},
  37. #ifdef RT_USING_SEMAPHORE
  38. {"list_sem", list_sem},
  39. #endif
  40. #ifdef RT_USING_MUTEX
  41. {"list_mutex", list_mutex},
  42. #endif
  43. #ifdef RT_USING_FEVENT
  44. {"list_fevent", list_fevent},
  45. #endif
  46. #ifdef RT_USING_EVENT
  47. {"list_event", list_event},
  48. #endif
  49. #ifdef RT_USING_MAILBOX
  50. {"list_mb", list_mailbox},
  51. #endif
  52. #ifdef RT_USING_MESSAGEQUEUE
  53. {"list_mq", list_msgqueue},
  54. #endif
  55. #ifdef RT_USING_MEMPOOL
  56. {"list_memp", list_mempool},
  57. #endif
  58. {"list_timer", list_timer},
  59. };
  60. struct finsh_syscall *_syscall_table_begin = &_syscall_table[0];
  61. struct finsh_syscall *_syscall_table_end = &_syscall_table[sizeof(_syscall_table) / sizeof(struct finsh_syscall)];
  62. struct finsh_sysvar *_sysvar_table_begin = NULL;
  63. struct finsh_sysvar *_sysvar_table_end = NULL;
  64. #endif
  65. #endif /* RT_USING_FINSH */