1
0

symbol.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * symbols in finsh shell.
  3. *
  4. * COPYRIGHT (C) 2006 - 2013, RT-Thread Development Team
  5. *
  6. * This file is part of RT-Thread (http://www.rt-thread.org)
  7. * Maintainer: bernard.xiong <bernard.xiong at gmail.com>
  8. *
  9. * All rights reserved.
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License along
  22. * with this program; if not, write to the Free Software Foundation, Inc.,
  23. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  24. *
  25. * Change Logs:
  26. * Date Author Notes
  27. * 2010-03-22 Bernard first version
  28. */
  29. #include "finsh.h"
  30. long hello(void);
  31. long version(void);
  32. long list(void);
  33. long list_thread(void);
  34. long list_sem(void);
  35. long list_mutex(void);
  36. long list_fevent(void);
  37. long list_event(void);
  38. long list_mailbox(void);
  39. long list_msgqueue(void);
  40. long list_mempool(void);
  41. long list_timer(void);
  42. #ifdef FINSH_USING_SYMTAB
  43. struct finsh_syscall *_syscall_table_begin = NULL;
  44. struct finsh_syscall *_syscall_table_end = NULL;
  45. struct finsh_sysvar *_sysvar_table_begin = NULL;
  46. struct finsh_sysvar *_sysvar_table_end = NULL;
  47. #else
  48. struct finsh_syscall _syscall_table[] =
  49. {
  50. {"hello", hello},
  51. {"version", version},
  52. {"list", list},
  53. {"list_thread", list_thread},
  54. #ifdef RT_USING_SEMAPHORE
  55. {"list_sem", list_sem},
  56. #endif
  57. #ifdef RT_USING_MUTEX
  58. {"list_mutex", list_mutex},
  59. #endif
  60. #ifdef RT_USING_FEVENT
  61. {"list_fevent", list_fevent},
  62. #endif
  63. #ifdef RT_USING_EVENT
  64. {"list_event", list_event},
  65. #endif
  66. #ifdef RT_USING_MAILBOX
  67. {"list_mb", list_mailbox},
  68. #endif
  69. #ifdef RT_USING_MESSAGEQUEUE
  70. {"list_mq", list_msgqueue},
  71. #endif
  72. #ifdef RT_USING_MEMPOOL
  73. {"list_memp", list_mempool},
  74. #endif
  75. {"list_timer", list_timer},
  76. };
  77. struct finsh_syscall *_syscall_table_begin = &_syscall_table[0];
  78. struct finsh_syscall *_syscall_table_end = &_syscall_table[sizeof(_syscall_table) / sizeof(struct finsh_syscall)];
  79. struct finsh_sysvar *_sysvar_table_begin = NULL;
  80. struct finsh_sysvar *_sysvar_table_end = NULL;
  81. #endif