symbol.c 2.4 KB
Newer Older
B
bernard.xiong 已提交
1
/*
B
Bernard Xiong 已提交
2
 *  symbols in finsh shell.
B
bernard.xiong 已提交
3
 *
B
Bernard Xiong 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 * COPYRIGHT (C) 2006 - 2013, RT-Thread Development Team
 *
 *  This file is part of RT-Thread (http://www.rt-thread.org)
 *  Maintainer: bernard.xiong <bernard.xiong at gmail.com>
 *
 *  All rights reserved.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
B
bernard.xiong 已提交
24 25 26 27 28
 *
 * Change Logs:
 * Date           Author       Notes
 * 2010-03-22     Bernard      first version
 */
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
#include "finsh.h"

long hello(void);
long version(void);
long list(void);
long list_thread(void);
long list_sem(void);
long list_mutex(void);
long list_fevent(void);
long list_event(void);
long list_mailbox(void);
long list_msgqueue(void);
long list_mempool(void);
long list_timer(void);

#ifdef FINSH_USING_SYMTAB
struct finsh_syscall *_syscall_table_begin 	= NULL;
struct finsh_syscall *_syscall_table_end 	= NULL;
struct finsh_sysvar *_sysvar_table_begin 	= NULL;
struct finsh_sysvar *_sysvar_table_end 		= NULL;
#else
struct finsh_syscall _syscall_table[] =
{
	{"hello", hello},
	{"version", version},
	{"list", list},
	{"list_thread", list_thread},
#ifdef RT_USING_SEMAPHORE
	{"list_sem", list_sem},
#endif
#ifdef RT_USING_MUTEX
	{"list_mutex", list_mutex},
#endif
#ifdef RT_USING_FEVENT
	{"list_fevent", list_fevent},
#endif
#ifdef RT_USING_EVENT
	{"list_event", list_event},
#endif
#ifdef RT_USING_MAILBOX
	{"list_mb", list_mailbox},
#endif
#ifdef RT_USING_MESSAGEQUEUE
	{"list_mq", list_msgqueue},
#endif
#ifdef RT_USING_MEMPOOL
B
bernard.xiong 已提交
75
	{"list_memp", list_mempool},
76 77 78 79 80 81 82 83 84
#endif
	{"list_timer", list_timer},
};
struct finsh_syscall *_syscall_table_begin = &_syscall_table[0];
struct finsh_syscall *_syscall_table_end   = &_syscall_table[sizeof(_syscall_table) / sizeof(struct finsh_syscall)];

struct finsh_sysvar *_sysvar_table_begin  = NULL;
struct finsh_sysvar *_sysvar_table_end    = NULL;
#endif