diff options
| author | Bernard Xiong <[email protected]> | 2021-02-20 12:15:49 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-20 12:15:49 +0800 |
| commit | 4094b0e398d0ee157522ba4f450ff7fdb17ac4fd (patch) | |
| tree | 6e6b9f1b6e983cf0aaa55c81c8036162fa3f62eb /components/libc/compilers/dlib | |
| parent | aa0adeccad1b74ff5ee1857b4621cff9c83682fa (diff) | |
| parent | ae2d414ca1580fc4ae8ab5618db01cb75af4d425 (diff) | |
Merge pull request #4358 from mysterywolf/master
[libc] 优化abort函数
Diffstat (limited to 'components/libc/compilers/dlib')
| -rw-r--r-- | components/libc/compilers/dlib/syscalls.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/components/libc/compilers/dlib/syscalls.c b/components/libc/compilers/dlib/syscalls.c index 10155948ba..007ea76bd1 100644 --- a/components/libc/compilers/dlib/syscalls.c +++ b/components/libc/compilers/dlib/syscalls.c @@ -6,19 +6,20 @@ * Change Logs: * Date Author Notes * 2021-02-13 Meco Man implement exit() and abort() + * 2021-02-20 Meco Man add system() */ #include <rtthread.h> -void exit (int status) +/* for exit() and abort() */ +void __exit (int status) { extern void __rt_libc_exit(int status); __rt_libc_exit(status); while(1); } -void abort(void) +int system(const char * string) { - extern void __rt_libc_abort(void); - __rt_libc_abort(); - while(1); + extern int __rt_libc_system(const char *string); + return __rt_libc_system(string); } |
