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