diff options
| author | Meco Man <[email protected]> | 2021-02-17 23:50:12 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-02-17 23:50:12 +0800 |
| commit | 263d856fa4025a727c0556f7fc286f79450d9932 (patch) | |
| tree | 5bf4544c3630fcae9cf520ddc596c091d5c41a79 /components/libc/compilers/common/stdlib.c | |
| parent | 933c54c668b8a9480a3f03c9ba3437763396a9cc (diff) | |
update
Diffstat (limited to 'components/libc/compilers/common/stdlib.c')
| -rw-r--r-- | components/libc/compilers/common/stdlib.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/components/libc/compilers/common/stdlib.c b/components/libc/compilers/common/stdlib.c index 45a65e9c96..b485bbd836 100644 --- a/components/libc/compilers/common/stdlib.c +++ b/components/libc/compilers/common/stdlib.c @@ -9,10 +9,9 @@ */ #include <rtthread.h> +#include <stdlib.h> -#define ABORT_STATUS 1 - -void __exit__(int status) +void __rt_libc_exit(int status) { rt_thread_t self = rt_thread_self(); @@ -25,7 +24,7 @@ void __exit__(int status) if (self != RT_NULL) { - if(status == ABORT_STATUS) /* abort() */ + if(status == EXIT_FAILURE) /* abort() */ { rt_kprintf("thread:%s abort!\n", self->name); } @@ -38,12 +37,12 @@ void __exit__(int status) } } -void __abort__(void) +void __rt_libc_abort(void) { - __exit__(ABORT_STATUS); + __rt_libc_exit(EXIT_FAILURE); } -int __system__(const char *string) +int __rt_libc_system(const char *string) { /* TODO */ return 0; |
