/** @file
This file declares a type and two functions and defines several
macros, for handling various signals (conditions that may be reported during
program execution).
For historical reasons; programs expect signal to be declared
The signal function is declared in the C Standard as:<BR>
void (*signal(int sig, void (*func)(int)))(int);
The EDK II implementation of the library or base firmware does not generate
any of these signals, except as a result of explicit calls to the raise function.
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _SIGNAL_H
#define _SIGNAL_H
#include <sys/EfiCdefs.h>
/* The type sig_atomic_t is the (possibly volatile-qualified) integer type of
an object that can be accessed as an atomic entity, even in the presence
of asynchronous interrupts.
*/
/** @{
The following three macros expand to constant expressions with distinct
values that have type compatible with the second argument to, and the
return value of, the signal function, and whose values compare unequal to
the address of any declarable function.
**/
/*@}*/
/** @{
The following macros expand to positive integer constant expressions with
type int and distinct values that are the signal numbers, each
corresponding to the specified condition.
The C95 specification requires these to be macros.
**/
#define SIGFPE __SigFpe ///< an erroneous arithmetic operation, such as zero divide or an operation resulting in overflow
/*@}*/
/** Send a signal.
The raise function carries out the actions described for signal,
raise function does not return until after the signal handler does.
@return The raise function returns zero if successful,
or nonzero if unsuccessful.
**/
#endif /* _SIGNAL_H */