| |||
| Home > The C and C++ libraries > __raise() | |||
Defined in rt_misc.h, this function raises
a signal to indicate a runtime anomaly. It is not part of the C
library standard, but is supported by the ARM C library as an extension.
int __raise(intsignal, inttype);
where:
signalis an integer that holds the signal number.
typeis an integer, string constant or variable that provides additional information about the circumstances that the signal was raised in, for some kinds of signal.
This function calls the normal C signal mechanism or the default signal handler.
You can replace the __raise() function
by defining:
int __raise(intsignal, inttype);
This enables you to bypass the C signal mechanism and its data-consuming signal handler vector, but otherwise gives essentially the same interface as:
void __default_signal_handler(intsignal, inttype);
The default signal handler of the library uses the parameter
of type __raise() to vary the messages it outputs.
There are three possibilities for a __raise() return
condition:
The handler performs a long jump or restart.
The signal was handled.
The calling code
must pass that return value to the exit code. The default library implementation
calls _sys_exit(rc) if __raise() returns
a nonzero return code rc.
Using the ARM C and C++ Libraries and Floating-Point Support:
Using ARM® C and C++ Libraries and Floating-Point Support: