Welcome to mirror list, hosted at ThFree Co, Russian Federation.

abort.c « nds32 « machine « libc « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 724562a84d3b4f16deefab3b703eb71da92b1868 (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
39
40
41
42
/*
FUNCTION
<<abort>>---abnormal termination of a program

INDEX
	abort

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

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

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
_DEFUN_VOID (abort)
{
  while (1)
    {
      _exit (1);
    }
}