2.9.4. __raise()

This function raises a signal to indicate a runtime anomaly.

Syntax

int __raise(int signal, int type);

where:

signal

Is an integer that holds the signal number.

type

Is an integer or string constant or variable.

Usage

This function calls the normal C signal mechanism or the default signal handler. See also _ttywrch() for more information.

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:

void __default_signal_handler(int signal, int type);

Also, see Thread‑safety in the ARM C libraries.

Return

There are three possibilities for __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.

Copyright © 2007 ARM Limited. All rights reserved.ARM DUI 0349A
Non-Confidential