aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/machine/nds32/abort.c
blob: 5fa0b6e7fc490c15f0c38aa8b80b60254e0f63e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
FUNCTION
<<abort>>---abnormal termination of a program

INDEX
	abort

SYNOPSIS
	#include <stdlib.h>
	void abort(void);

DESCRIPTION
Use <<abort>> to signal that your program has detected a condition it
cannot deal with.  Normally, <<abort>> ends your program's execution.

In general implementation, <<abort>> raises the exception <<SIGABRT>>.
But for nds32 target, currently it is not necessary for MCU platform.
We can just call <<_exit>> to terminate program.

RETURNS
<<abort>> does not return to its caller.

PORTABILITY
ANSI C requires <<abort>>.

Supporting OS subroutines required: <<_exit>>.
*/

#include <unistd.h>

void
abort (void)
{
  while (1)
    {
      _exit (1);
    }
}