summaryrefslogtreecommitdiffstats
path: root/include/signal.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-23 11:04:48 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-23 11:04:48 +0000
commit49f2fcb08b6a1b80d77cbd56aecbb447d97a154d (patch)
tree4048d9e0efe45ebf0280280b412273fd6f7ab84a /include/signal.h
parent1e0c4ca7448cf41bd38742ae885c9da6f4e48d97 (diff)
downloaduClibc-alpine-49f2fcb08b6a1b80d77cbd56aecbb447d97a154d.tar.bz2
uClibc-alpine-49f2fcb08b6a1b80d77cbd56aecbb447d97a154d.tar.xz
signal.h consolidation from trunk.
No object code difference (tested on i386).
Diffstat (limited to 'include/signal.h')
-rw-r--r--include/signal.h47
1 files changed, 33 insertions, 14 deletions
diff --git a/include/signal.h b/include/signal.h
index 2946f9c5f..b42800f51 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -57,12 +57,35 @@ typedef __sigset_t sigset_t;
#include <bits/types.h>
#include <bits/signum.h>
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+#ifdef __USE_UNIX98
+# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
+#endif
+/* Biggest signal number + 1 (including real-time signals). */
+#ifndef _NSIG /* if arch has not defined it in bits/signum.h... */
+# define _NSIG 65
+#endif
+#ifdef __USE_MISC
+# define NSIG _NSIG
+#endif
+/* Real-time signal range */
+#define SIGRTMIN (__libc_current_sigrtmin())
+#define SIGRTMAX (__libc_current_sigrtmax())
+/* These are the hard limits of the kernel. These values should not be
+ used directly at user level. */
+#ifndef __SIGRTMIN /* if arch has not defined it in bits/signum.h... */
+# define __SIGRTMIN 32
+#endif
+#define __SIGRTMAX (_NSIG - 1)
+
+
#if defined __USE_XOPEN || defined __USE_XOPEN2K
# ifndef __pid_t_defined
typedef __pid_t pid_t;
# define __pid_t_defined
-#endif
-#ifdef __USE_XOPEN
# endif
# ifndef __uid_t_defined
typedef __uid_t uid_t;
@@ -79,10 +102,10 @@ typedef void (*__sighandler_t) (int);
requested. */
extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
__THROW;
-#ifdef __USE_GNU
+# ifdef __USE_GNU
extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
__THROW;
-#endif
+# endif
#endif /* __UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL__ */
/* Set the handler for the signal SIG to HANDLER, returning the old
@@ -118,14 +141,14 @@ extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
#ifdef __USE_POSIX
extern int kill (__pid_t __pid, int __sig) __THROW;
libc_hidden_proto(kill)
-#endif /* Use POSIX. */
+#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Send SIG to all processes in process group PGRP.
If PGRP is zero, send SIG to all processes in
the current process's process group. */
extern int killpg (__pid_t __pgrp, int __sig) __THROW;
-#endif /* Use BSD || X/Open Unix. */
+#endif
__BEGIN_NAMESPACE_STD
/* Raise signal SIG, i.e., send SIG to yourself. */
@@ -195,10 +218,6 @@ extern int siggetmask (void) __THROW __attribute_deprecated__;
#endif /* Use BSD. */
-#ifdef __USE_MISC
-# define NSIG _NSIG
-#endif
-
#ifdef __USE_GNU
typedef __sighandler_t sighandler_t;
#endif
@@ -316,12 +335,12 @@ extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
#ifdef __USE_BSD
-#ifdef __UCLIBC_HAS_SYS_SIGLIST__
+# ifdef __UCLIBC_HAS_SYS_SIGLIST__
/* Names of the signals. This variable exists only for compatibility.
Use `strsignal' instead (see <string.h>). */
-#define _sys_siglist sys_siglist
+# define _sys_siglist sys_siglist
extern __const char *__const sys_siglist[_NSIG];
-#endif /* __UCLIBC_HAS_SYS_SIGLIST__ */
+# endif
/* Structure passed to `sigvec'. */
struct sigvec
@@ -404,7 +423,7 @@ extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW;
be defined here. */
# include <bits/pthreadtypes.h>
# include <bits/sigthread.h>
-#endif /* use Unix98 */
+#endif
/* The following functions are used internally in the C library and in
other code which need deep insights. */