summaryrefslogtreecommitdiff
path: root/components/libc/compilers
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-08-30 20:27:45 +0800
committerBernard Xiong <[email protected]>2018-08-30 20:27:45 +0800
commitefe4523132169a4f28b84b1820a1a71d35118965 (patch)
treeac0408e0933701a08122a3d0cd4dc6687a96316e /components/libc/compilers
parent240451b978d5775f0e936ed57d682ca1ccee604d (diff)
[Kernel] move module tolibc/libdl.
Diffstat (limited to 'components/libc/compilers')
-rw-r--r--components/libc/compilers/newlib/syscalls.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/components/libc/compilers/newlib/syscalls.c b/components/libc/compilers/newlib/syscalls.c
index 822182ba93..cc72efe9ea 100644
--- a/components/libc/compilers/newlib/syscalls.c
+++ b/components/libc/compilers/newlib/syscalls.c
@@ -11,6 +11,10 @@
#include <pthread.h>
#endif
+#ifdef RT_USING_MODULE
+#include <dlmodule.h>
+#endif
+
/* Reentrant versions of system calls. */
int
@@ -379,18 +383,12 @@ _free_r (struct _reent *ptr, void *addr)
}
void
-_exit (int status)
+exit (int status)
{
#ifdef RT_USING_MODULE
- rt_module_t module;
-
- module = rt_module_self();
- if (module != RT_NULL)
+ if (dlmodule_self())
{
- rt_thread_suspend(rt_thread_self());
-
- /* re-schedule */
- rt_schedule();
+ dlmodule_exit(status);
}
#endif