优化abort函数

This commit is contained in:
Meco Man
2021-02-20 11:31:58 +08:00
parent 8ea33c2101
commit eaa3454bbe
4 changed files with 6 additions and 31 deletions
+1 -14
View File
@@ -9,7 +9,6 @@
*/
#include <rtthread.h>
#include <stdlib.h>
void __rt_libc_exit(int status)
{
@@ -24,24 +23,12 @@ void __rt_libc_exit(int status)
if (self != RT_NULL)
{
if(status == EXIT_FAILURE) /* abort() */
{
rt_kprintf("thread:%s abort!\n", self->name);
}
else /* exit() */
{
rt_kprintf("thread:%s exit:%d!\n", self->name, status);
}
rt_kprintf("thread:%s exit:%d!\n", self->name, status);
rt_thread_suspend(self);
rt_schedule();
}
}
void __rt_libc_abort(void)
{
__rt_libc_exit(EXIT_FAILURE);
}
int __rt_libc_system(const char *string)
{
/* TODO */