summaryrefslogtreecommitdiff
path: root/components/libc/compilers/armlibc/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/libc/compilers/armlibc/syscalls.c')
-rw-r--r--components/libc/compilers/armlibc/syscalls.c24
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