source: trunk/libs/newlib/src/newlib/libc/machine/nds32/abort.c @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 692 bytes
Line 
1/*
2FUNCTION
3<<abort>>---abnormal termination of a program
4
5INDEX
6        abort
7
8SYNOPSIS
9        #include <stdlib.h>
10        void abort(void);
11
12DESCRIPTION
13Use <<abort>> to signal that your program has detected a condition it
14cannot deal with.  Normally, <<abort>> ends your program's execution.
15
16In general implementation, <<abort>> raises the exception <<SIGABRT>>.
17But for nds32 target, currently it is not necessary for MCU platform.
18We can just call <<_exit>> to terminate program.
19
20RETURNS
21<<abort>> does not return to its caller.
22
23PORTABILITY
24ANSI C requires <<abort>>.
25
26Supporting OS subroutines required: <<_exit>>.
27*/
28
29#include <unistd.h>
30
31void
32abort (void)
33{
34  while (1)
35    {
36      _exit (1);
37    }
38}
Note: See TracBrowser for help on using the repository browser.