symbol.c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 "finsh.h"
  11. long hello(void);
  12. long version(void);
  13. long list(void);
  14. long list_thread(void);
  15. long list_sem(void);
  16. long list_mutex(void);
  17. long list_fevent(void);
  18. long list_event(void);
  19. long list_mailbox(void);
  20. long list_msgqueue(void);
  21. long list_mempool(void);
  22. long list_timer(void);
  23. #ifdef FINSH_USING_SYMTAB
  24. struct finsh_syscall *_syscall_table_begin = NULL;
  25. struct finsh_syscall *_syscall_table_end = NULL;
  26. struct finsh_sysvar *_sysvar_table_begin = NULL;
  27. struct finsh_sysvar *_sysvar_table_end = NULL;
  28. #else
  29. struct finsh_syscall _syscall_table[] =
  30. {
  31. {"hello", hello},
  32. {"version", version},
  33. {"list", list},
  34. {"list_thread", list_thread},
  35. #ifdef RT_USING_SEMAPHORE
  36. {"list_sem", list_sem},
  37. #endif
  38. #ifdef RT_USING_MUTEX
  39. {"list_mutex", list_mutex},
  40. #endif
  41. #ifdef RT_USING_FEVENT
  42. {"list_fevent", list_fevent},
  43. #endif
  44. #ifdef RT_USING_EVENT
  45. {"list_event", list_event},
  46. #endif
  47. #ifdef RT_USING_MAILBOX
  48. {"list_mb", list_mailbox},
  49. #endif
  50. #ifdef RT_USING_MESSAGEQUEUE
  51. {"list_mq", list_msgqueue},
  52. #endif
  53. #ifdef RT_USING_MEMPOOL
  54. {"list_memp", list_mempool},
  55. #endif
  56. {"list_timer", list_timer},
  57. };
  58. struct finsh_syscall *_syscall_table_begin = &_syscall_table[0];
  59. struct finsh_syscall *_syscall_table_end = &_syscall_table[sizeof(_syscall_table) / sizeof(struct finsh_syscall)];
  60. struct finsh_sysvar *_sysvar_table_begin = NULL;
  61. struct finsh_sysvar *_sysvar_table_end = NULL;
  62. #endif