update mappings to reflect recent changes
[AROS.git] / compiler / clib / abort.c
blobef3510c84ffeda139691f78e449cdd6d555914cb
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function exit().
6 */
8 #include <exec/types.h>
9 #include <setjmp.h>
10 #include <stdio.h>
11 #include <signal.h>
12 #include <assert.h>
14 #include "__arosc_privdata.h"
16 /*****************************************************************************
18 NAME */
19 #include <stdlib.h>
21 void abort (
23 /* SYNOPSIS */
24 void)
26 /* FUNCTION
27 Causes abnormal program termination. If there is a signal handler
28 for SIGABORT, then the handler will be called. If the handler
29 returns, then the program is aborted anyway.
31 INPUTS
32 None.
34 RESULT
35 None. This function does not return.
37 NOTES
38 This function must not be used in a shared library or
39 in a threaded application.
41 EXAMPLE
42 if (fatal_error)
43 abort ();
45 BUGS
46 Signal handling is not implemented yet.
48 SEE ALSO
49 signal(), exit()
51 INTERNALS
53 ******************************************************************************/
55 raise(SIGABRT);
57 /* Abort anyway */
58 __arosc_jmp2exit(0, 20);
60 assert(0); /* Should not be reached and will likely bomb recursively */