]> git.proxmox.com Git - mirror_edk2.git/blob - StdLib/Include/sys/signal.h
e945a62bfe2f8e80e6f5b6b2b86d8f79f076f5c1
[mirror_edk2.git] / StdLib / Include / sys / signal.h
1 /**
2 Copyright (c) 2010, 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 __Sig_Last
26 };
27
28 /** The type of a signal handler function. **/
29 typedef void __sighandler_t(int);
30
31 /** The signal function associates a "signal handler" with a signal number.
32
33 For historical reasons; programs expect signal to be declared
34 in <sys/signal.h>.
35
36 @param[in] sig Signal number that function is to be associated with.
37 @param[in] function The "handler" function to be associated with signal sig.
38
39 @return If the request can be honored, the signal function returns the
40 value of func for the most recent successful call to signal for
41 the specified signal sig. Otherwise, a value of SIG_ERR is
42 returned and a positive value is stored in errno.
43 */
44 __BEGIN_DECLS
45 __sighandler_t *signal(int sig, __sighandler_t *func);
46 __END_DECLS
47
48 #endif /* _SYS_SIGNAL_H */