diff options
| author | weety <[email protected]> | 2016-05-31 20:23:32 +0800 |
|---|---|---|
| committer | weety <[email protected]> | 2016-05-31 20:23:32 +0800 |
| commit | 94e1935f1f2149f4e98098fbd171c3e96acb0e14 (patch) | |
| tree | c775db6b6c5fdc5c6ae811b44a5791af40784e2a /components/libc/newlib | |
| parent | 714f00679eed2c8d1e758c768cf7af57944a5f08 (diff) | |
| parent | c8cfc14b82c633c7153113ac1f753695254d4bd6 (diff) | |
Merge branch 'master' of https://github.com/RT-Thread/rt-thread into fixed
Diffstat (limited to 'components/libc/newlib')
| -rw-r--r-- | components/libc/newlib/syscalls.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/components/libc/newlib/syscalls.c b/components/libc/newlib/syscalls.c index 239d208520..55c19ccee9 100644 --- a/components/libc/newlib/syscalls.c +++ b/components/libc/newlib/syscalls.c @@ -447,3 +447,18 @@ void __libc_init_array(void) { /* we not use __libc init_aray to initialize C++ objects */ } + +void abort(void) +{ + if (rt_thread_self()) + { + rt_thread_t self = rt_thread_self(); + + rt_kprintf("thread:%-8.*s abort!\n", RT_NAME_MAX, self->name); + rt_thread_suspend(self); + + rt_schedule(); + } + + while (1); +} |
