mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-18 15:43:32 +08:00
Merge pull request #2870 from armink/fix_shell
[finsh] Fix the compile error when only using msh mode on x86_64 plat…
This commit is contained in:
commit
badac5175e
@ -78,28 +78,6 @@ void finsh_syscall_append(const char* name, syscall_func func)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || (defined(__GNUC__) && defined(__x86_64__))
|
||||
struct finsh_syscall* finsh_syscall_next(struct finsh_syscall* call)
|
||||
{
|
||||
unsigned int *ptr;
|
||||
ptr = (unsigned int*) (call + 1);
|
||||
while ((*ptr == 0) && ((unsigned int*)ptr < (unsigned int*) _syscall_table_end))
|
||||
ptr ++;
|
||||
|
||||
return (struct finsh_syscall*)ptr;
|
||||
}
|
||||
|
||||
struct finsh_sysvar* finsh_sysvar_next(struct finsh_sysvar* call)
|
||||
{
|
||||
unsigned int *ptr;
|
||||
ptr = (unsigned int*) (call + 1);
|
||||
while ((*ptr == 0) && ((unsigned int*)ptr < (unsigned int*) _sysvar_table_end))
|
||||
ptr ++;
|
||||
|
||||
return (struct finsh_sysvar*)ptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct finsh_syscall* finsh_syscall_lookup(const char* name)
|
||||
{
|
||||
struct finsh_syscall* index;
|
||||
|
@ -44,6 +44,28 @@ struct finsh_shell _shell;
|
||||
struct finsh_shell *shell;
|
||||
static char *finsh_prompt_custom = RT_NULL;
|
||||
|
||||
#if defined(_MSC_VER) || (defined(__GNUC__) && defined(__x86_64__))
|
||||
struct finsh_syscall* finsh_syscall_next(struct finsh_syscall* call)
|
||||
{
|
||||
unsigned int *ptr;
|
||||
ptr = (unsigned int*) (call + 1);
|
||||
while ((*ptr == 0) && ((unsigned int*)ptr < (unsigned int*) _syscall_table_end))
|
||||
ptr ++;
|
||||
|
||||
return (struct finsh_syscall*)ptr;
|
||||
}
|
||||
|
||||
struct finsh_sysvar* finsh_sysvar_next(struct finsh_sysvar* call)
|
||||
{
|
||||
unsigned int *ptr;
|
||||
ptr = (unsigned int*) (call + 1);
|
||||
while ((*ptr == 0) && ((unsigned int*)ptr < (unsigned int*) _sysvar_table_end))
|
||||
ptr ++;
|
||||
|
||||
return (struct finsh_sysvar*)ptr;
|
||||
}
|
||||
#endif /* defined(_MSC_VER) || (defined(__GNUC__) && defined(__x86_64__)) */
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
int finsh_set_prompt(const char * prompt)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user