diff options
| author | Bernard Xiong <[email protected]> | 2021-02-24 16:43:00 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-24 16:43:00 +0800 |
| commit | 86aec6371a4faa5f58e65fe528033ca6ee87206e (patch) | |
| tree | f10e86b8728284f2366656be3e8fca22e78df135 /components/libc | |
| parent | 06e01da1d55b029818d151c71dc0d46c710d7485 (diff) | |
| parent | 2b98ac215a4e07401464bfcd6ad00957ff03bd72 (diff) | |
Merge pull request #4381 from mysterywolf/exit
[kernel] rt_thread_control() 关闭线程后增加rt_schedule调度
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/compilers/common/stdlib.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/components/libc/compilers/common/stdlib.c b/components/libc/compilers/common/stdlib.c index 9f801ab966..48a86098cd 100644 --- a/components/libc/compilers/common/stdlib.c +++ b/components/libc/compilers/common/stdlib.c @@ -14,18 +14,10 @@ void __rt_libc_exit(int status) { rt_thread_t self = rt_thread_self(); -#ifdef RT_USING_MODULE - if (dlmodule_self()) - { - dlmodule_exit(status); - } -#endif - if (self != RT_NULL) { rt_kprintf("thread:%s exit:%d!\n", self->name, status); - rt_thread_suspend(self); - rt_schedule(); + rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL); } } |
