Datasheet

The C and C++ Libraries
4-54 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
0 The signal was handled.
nonzero 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.
4.7.5 __rt_raise()
This function raises a signal to indicate a runtime anomaly.
Syntax
void __rt_raise(int signal, int type)
signal
Is an integer that holds the signal number.
type
Is an integer or string constant or variable.
Implementation
Redefine this to replace the entire signal handling mechanismfor the library. The default
implementation calls
__raise()
. See __raise() on page 4-53 for more information.
Depending on the value returned from
__raise()
:
no return The handler performed a long jump or restart and
__rt_raise()
does not
regain control.
0 The signal was handled and
__rt_raise()
exits.
nonzero The default library implementation calls
_sys_exit(rc)
if
__raise()
returns a nonzero return code rc.
4.7.6 __default_signal_handler()
This function handles a raised signal. The default action is to print an error message and
exit.
Syntax
void __default_signal_handler(int signal, int arg)
Implementation
The default signal handler uses
_ttywrch()
toprint a message and calls
_sys_exit()
to
exit. You can replace the default signal handler by defining: