symbol.c 1.7 KB
Newer Older
B
bernard.xiong 已提交
1
/*
2
 * Copyright (c) 2006-2018, RT-Thread Development Team
B
bernard.xiong 已提交
3
 *
4
 * SPDX-License-Identifier: Apache-2.0
B
bernard.xiong 已提交
5 6 7 8 9
 *
 * Change Logs:
 * Date           Author       Notes
 * 2010-03-22     Bernard      first version
 */
10 11 12 13 14
 
#include <rtthread.h>

#ifdef RT_USING_FINSH

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#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
31 32 33 34
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;
35 36 37
#else
struct finsh_syscall _syscall_table[] =
{
38 39 40 41
    {"hello", hello},
    {"version", version},
    {"list", list},
    {"list_thread", list_thread},
42
#ifdef RT_USING_SEMAPHORE
43
    {"list_sem", list_sem},
44 45
#endif
#ifdef RT_USING_MUTEX
46
    {"list_mutex", list_mutex},
47 48
#endif
#ifdef RT_USING_FEVENT
49
    {"list_fevent", list_fevent},
50 51
#endif
#ifdef RT_USING_EVENT
52
    {"list_event", list_event},
53 54
#endif
#ifdef RT_USING_MAILBOX
55
    {"list_mb", list_mailbox},
56 57
#endif
#ifdef RT_USING_MESSAGEQUEUE
58
    {"list_mq", list_msgqueue},
59 60
#endif
#ifdef RT_USING_MEMPOOL
61
    {"list_memp", list_mempool},
62
#endif
63
    {"list_timer", list_timer},
64 65 66 67 68 69 70
};
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
71 72 73

#endif /* RT_USING_FINSH */