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