]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/Include/signal.h
Fix GCC build errors.
[mirror_edk2.git] / StdLib / Include / signal.h
index 52873c764d6a8c9494f7135fcc7e3563046918a0..26f8d6b798949af11c07f9ab932b447e992681e7 100644 (file)
@@ -1,28 +1,25 @@
 /** @file\r
-  The header <signal.h> declares a type and two functions and defines several\r
+  This file declares a type and two functions and defines several\r
   macros, for handling various signals (conditions that may be reported during\r
   program execution).\r
 \r
-  The UEFI implementation of <signal.h> maps signals onto the UEFI\r
-  event mechanism.\r
+    For historical reasons; programs expect signal to be declared\r
+    in <sys/signal.h>.  The signal function is documented in <sys/signal.h>.\r
 \r
-  An implementation need not generate any of these signals, except as a result\r
-  of explicit calls to the raise function. Additional signals and pointers to\r
-  undeclarable functions, with macro definitions beginning, respectively, with\r
-  the letters SIG and an uppercase letter or with SIG_ and an uppercase letter\r
-  may also be specified by the implementation. The complete set of signals,\r
-  their semantics, and their default handling is implementation-defined; all\r
-  signal numbers shall be positive.\r
+    The signal function is declared in the C Standard as:<BR>\r
+    void (*signal(int sig, void (*func)(int)))(int);\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under\r
-the terms and conditions of the BSD License that accompanies this distribution.\r
-The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.\r
+    The EDK II implementation of the library or base firmware does not generate\r
+    any of these signals, except as a result of explicit calls to the raise function.\r
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+    Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+    This program and the accompanying materials are licensed and made available under\r
+    the terms and conditions of the BSD License that accompanies this distribution.\r
+    The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.\r
 \r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 **/\r
 #ifndef _SIGNAL_H\r
 #define _SIGNAL_H\r
@@ -36,7 +33,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     This, possibly machine specific, type is defined in <machine/signal.h>.\r
 */\r
 \r
-/** The following three macros expand to constant expressions with distinct\r
+/** @{\r
+    The following three macros expand to constant expressions with distinct\r
     values that have type compatible with the second argument to, and the\r
     return value of, the signal function, and whose values compare unequal to\r
     the address of any declarable function.\r
@@ -44,37 +42,42 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define SIG_IGN   ((__sighandler_t *) 0)\r
 #define SIG_DFL   ((__sighandler_t *) 1)\r
 #define SIG_ERR   ((__sighandler_t *) 3)\r
+/*@}*/\r
 \r
-/** The following members expand to positive integer constant expressions with\r
+/** @{\r
+    The following macros expand to positive integer constant expressions with\r
     type int and distinct values that are the signal numbers, each\r
     corresponding to the specified condition.\r
-    Many existing programs expect these to be macros.\r
+    The C95 specification requires these to be macros.\r
 **/\r
-#define SIGINT    1   ///< receipt of an interactive attention signal\r
-#define SIGILL    2   ///< detection of an invalid function image, such as an invalid instruction\r
-#define SIGABRT   3   ///< abnormal termination, such as is initiated by the abort function\r
-#define SIGFPE    4   ///< an erroneous arithmetic operation, such as zero divide or an operation resulting in overflow\r
-#define SIGSEGV   5   ///< an invalid access to storage\r
-#define SIGTERM   6   ///< a termination request sent to the program\r
-#define SIG_LAST  7   ///< One more than the largest signal number\r
+#define SIGINT     __SigInt     ///< receipt of an interactive attention signal\r
+#define SIGILL     __SigIll     ///< detection of an invalid function image, such as an invalid instruction\r
+#define SIGABRT    __SigAbrt    ///< abnormal termination, such as is initiated by the abort function\r
+#define SIGFPE     __SigFpe     ///< an erroneous arithmetic operation, such as zero divide or an operation resulting in overflow\r
+#define SIGSEGV    __SigSegv    ///< an invalid access to storage\r
+#define SIGTERM    __SigTerm    ///< a termination request sent to the program\r
+#define SIGBREAK   __SigBreak   ///< added for Python\r
+#define SIGALRM    __SigAlrm    ///< Added for Posix timer functions\r
+#define SIGVTALRM  __SigVtAlrm  ///< Added for Posix timer functions\r
+#define SIGPROF    __SigProf    ///< Added for Posix timer functions\r
+#define SIGUSR1    __SigUsr1    ///< Added for Posix timer functions\r
+#define SIGUSR2    __SigUsr2    ///< Added for Posix timer functions\r
+#define SIGWINCH   __SigWinch   ///< Added for Posix timer functions\r
+#define SIGPIPE    __SigPipe    ///< Added for Posix timer functions\r
+#define SIGQUIT    __SigQuit    ///< Added for Posix timer functions\r
+#define SIG_LAST   __Sig_Last   ///< One more than the largest signal number\r
+/*@}*/\r
 \r
 __BEGIN_DECLS\r
 \r
-/*  For historical reasons; programs expect signal to be declared\r
-    in <sys/signal.h>.  The function is documented in <sys/signal.h>.\r
-\r
-    The function is declared in the C Standard as:<BR>\r
-      void (*signal(int sig, void (*func)(int)))(int);\r
-*/\r
-\r
 /** Send a signal.\r
 \r
     The raise function carries out the actions described for signal,\r
     in <sys/signal.h>, for the signal sig. If a signal handler is called, the\r
-    raise function shall not return until after the signal handler does.\r
+    raise function does not return until after the signal handler does.\r
 \r
     @return   The raise function returns zero if successful,\r
-              nonzero if unsuccessful.\r
+              or nonzero if unsuccessful.\r
 **/\r
 int raise(int sig);\r
 \r