diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-01-07 02:32:27 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-01-07 02:32:27 +0000 |
commit | e523bd15353350c3480b8a1820a0944b0fa8212e (patch) | |
tree | 60485116f9c62c306bb753f12f9d4eb79d16aa4e /libc/stdlib/abort.c | |
parent | 3b3434516a3415d7e0f4e1d50c553876dcb337b2 (diff) | |
download | uClibc-alpine-e523bd15353350c3480b8a1820a0944b0fa8212e.tar.bz2 uClibc-alpine-e523bd15353350c3480b8a1820a0944b0fa8212e.tar.xz |
Big fricking merge from trunk.
Diffstat (limited to 'libc/stdlib/abort.c')
-rw-r--r-- | libc/stdlib/abort.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c index d24d1a94c..47252d1f7 100644 --- a/libc/stdlib/abort.c +++ b/libc/stdlib/abort.c @@ -64,13 +64,12 @@ Cambridge, MA 02139, USA. */ #define ABORT_INSTRUCTION asm ("hlt") #else #define ABORT_INSTRUCTION -#warning no abort instruction define for your arch +#warning no abort instruction defined for your arch #endif #ifdef __UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT__ -extern void weak_function _stdio_term(void); +extern void weak_function _stdio_term(void) attribute_hidden; #endif -extern void _exit __P((int __status)) __attribute__ ((__noreturn__)); static int been_there_done_that = 0; /* Be prepared in case multiple threads try to abort() */ @@ -81,10 +80,12 @@ static pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; #define LOCK __pthread_mutex_lock(&mylock) #define UNLOCK __pthread_mutex_unlock(&mylock) - extern int __raise (int __sig) __THROW attribute_hidden; + /* Cause an abnormal program termination with core-dump */ -void abort(void) +#undef __abort +#undef abort +void attribute_hidden __abort(void) { sigset_t sigset; @@ -140,7 +141,7 @@ abort_it: /* Still here? Try to at least exit */ if (been_there_done_that == 3) { been_there_done_that++; - _exit(127); + _exit_internal(127); } /* Still here? We're screwed. Sleepy time. Good night. */ @@ -149,3 +150,4 @@ abort_it: ABORT_INSTRUCTION; } } +strong_alias(__abort,abort) |