]> git.proxmox.com Git - mirror_edk2.git/blob - StdLib/Include/sys/signal.h
6f21fcd0a2c9d6240cafddf0f04170d9aa65e25c
[mirror_edk2.git] / StdLib / Include / sys / signal.h
1 /**
2 Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
3 This program and the accompanying materials are licensed and made available under
4 the terms and conditions of the BSD License that accompanies this distribution.
5 The full text of the license may be found at
6 http://opensource.org/licenses/bsd-license.php.
7
8 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
10
11 **/
12 #ifndef _SYS_SIGNAL_H
13 #define _SYS_SIGNAL_H
14 #include <sys/EfiCdefs.h>
15 #include <machine/signal.h>
16
17 enum {
18 __SigInt = 1,
19 __SigIll,
20 __SigAbrt,
21 __SigFpe,
22 __SigSegv,
23 __SigTerm,
24 __SigBreak,
25 __SigAlrm,
26 __SigVtAlrm,
27 __SigProf,
28 __SigUsr1,
29 __SigUsr2,
30 __SigWinch,
31 __SigPipe,
32 __SigQuit,
33 __Sig_Last
34 };
35
36 /** The type of a signal handler function. **/
37 typedef void __sighandler_t(int);
38
39 /** The signal function associates a "signal handler" with a signal number.
40
41 For historical reasons; programs expect signal to be declared
42 in <sys/signal.h>.
43
44 @param[in] sig Signal number that function is to be associated with.
45 @param[in] function The "handler" function to be associated with signal sig.
46
47 @return If the request can be honored, the signal function returns the
48 value of func for the most recent successful call to signal for
49 the specified signal sig. Otherwise, a value of SIG_ERR is
50 returned and a positive value is stored in errno.
51 */
52 __BEGIN_DECLS
53 __sighandler_t *signal(int sig, __sighandler_t *func);
54 __END_DECLS
55
56 #endif /* _SYS_SIGNAL_H */