Keil Logo

__raise()

4.19 __raise()

Defined in rt_misc.h, the __raise() function raises a signal to indicate a runtime anomaly.

It is not part of the C library standard, but the ARM® C library supports it as an extension.

Syntax

int __raise(int signal, int type);
where:
signal
is an integer that holds the signal number.
type
is an integer, string constant or variable that provides additional information about the circumstances that the signal was raised in, for some kinds of signal.

Usage

If the user has configured the handling of the signal by calling signal() then __raise() takes the action specified by the user. That is, either to ignore the signal or to call the user-provided handler function. Otherwise, __raise() calls __default_signal_handler(), which provides the default signal handling behavior.
You can replace the __raise() function by defining:
int __raise(int signal, int type);
This enables you to bypass the C signal mechanism and its data-consuming signal handler vector, but otherwise gives essentially the same interface as:
int __default_signal_handler(int signal, int type);
The default signal handler of the library uses the type parameter of __raise() to vary the messages it outputs.

Returns

There are three possibilities for a __raise() return condition:
no return
The handler performs a long jump or restart.
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.
Non-ConfidentialPDF file icon PDF versionARM DUI0378H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.