diff options
| author | Meco Jianting Man <[email protected]> | 2021-02-18 01:30:19 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-18 01:30:19 -0600 |
| commit | 8ea33c2101cdc8d8d8a5f94479acca310fbbfb75 (patch) | |
| tree | 48ba0df2445feb188eed3df81d9e2a62d6d57f53 /components/libc/compilers/armlibc/syscalls.c | |
| parent | e19873db6d6947f02e0b093251adf3c73daabdd8 (diff) | |
| parent | 6420c2779143f414ca2850cb2ab3d72a4ff10a9b (diff) | |
Merge pull request #18 from RT-Thread/master
pr
Diffstat (limited to 'components/libc/compilers/armlibc/syscalls.c')
| -rw-r--r-- | components/libc/compilers/armlibc/syscalls.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/components/libc/compilers/armlibc/syscalls.c b/components/libc/compilers/armlibc/syscalls.c index 1e08ca1716..37f296fc3a 100644 --- a/components/libc/compilers/armlibc/syscalls.c +++ b/components/libc/compilers/armlibc/syscalls.c @@ -258,23 +258,9 @@ void _ttywrch(int ch) RT_WEAK void _sys_exit(int return_code) { - rt_thread_t self = rt_thread_self(); - -#ifdef RT_USING_MODULE - if (dlmodule_self()) - { - dlmodule_exit(return_code); - } -#endif - - if (self != RT_NULL) - { - rt_kprintf("thread:%-8.*s exit:%d!\n", RT_NAME_MAX, self->name, return_code); - rt_thread_suspend(self); - rt_schedule(); - } - - while(1); /* noreturn */ + extern void __rt_libc_exit(int status); + __rt_libc_exit(return_code); + while(1); } /** @@ -320,8 +306,8 @@ int remove(const char *filename) #else int system(const char *string) { - RT_ASSERT(0); - for (;;); + extern int __rt_libc_system(const char *string); + return __rt_libc_system(string); } #endif |
