]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/Include/sys/signal.h
Update or add comments to files and functions for use by Doxygen.
[mirror_edk2.git] / StdLib / Include / sys / signal.h
CommitLineData
a430bdb1 1/** @file\r
2aa62f2b 2\r
a430bdb1 3 Implementation and Platform specific portion of <signal.h>.\r
2aa62f2b 4\r
a430bdb1 5 Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
6 This program and the accompanying materials are licensed and made available under\r
7 the terms and conditions of the BSD License that accompanies this distribution.\r
8 The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
2aa62f2b 13**/\r
14#ifndef _SYS_SIGNAL_H\r
15#define _SYS_SIGNAL_H\r
16#include <sys/EfiCdefs.h>\r
17#include <machine/signal.h>\r
18\r
a430bdb1 19/** The actual (default) signal numbers are assigned using an anonymous enum\r
20 so that the compiler can do the work of assigning values. This helps\r
21 ensure that the developer should never have to renumber the signals or\r
22 figure out what number to assign to a new signal.\r
23\r
24 Properly constructed programs will NEVER depend upon signal numbers being\r
25 in a particular order or having a particular value. All that is guaranteed\r
26 is that each signal number is distinct, positive, and non-zero.\r
27**/\r
53e1e5c6 28enum {\r
29 __SigInt = 1,\r
30 __SigIll,\r
31 __SigAbrt,\r
32 __SigFpe,\r
33 __SigSegv,\r
34 __SigTerm,\r
35 __SigBreak,\r
d7ce7006 36 __SigAlrm,\r
37 __SigVtAlrm,\r
38 __SigProf,\r
39 __SigUsr1,\r
40 __SigUsr2,\r
41 __SigWinch,\r
42 __SigPipe,\r
43 __SigQuit,\r
53e1e5c6 44 __Sig_Last\r
45};\r
46\r
2aa62f2b 47/** The type of a signal handler function. **/\r
48typedef void __sighandler_t(int);\r
49\r
a430bdb1 50__BEGIN_DECLS\r
2aa62f2b 51/** The signal function associates a "signal handler" with a signal number.\r
52\r
53 For historical reasons; programs expect signal to be declared\r
54 in <sys/signal.h>.\r
55\r
56 @param[in] sig Signal number that function is to be associated with.\r
57 @param[in] function The "handler" function to be associated with signal sig.\r
58\r
59 @return If the request can be honored, the signal function returns the\r
60 value of func for the most recent successful call to signal for\r
61 the specified signal sig. Otherwise, a value of SIG_ERR is\r
62 returned and a positive value is stored in errno.\r
63 */\r
2aa62f2b 64__sighandler_t *signal(int sig, __sighandler_t *func);\r
a430bdb1 65\r
2aa62f2b 66__END_DECLS\r
67\r
68#endif /* _SYS_SIGNAL_H */\r