summaryrefslogtreecommitdiff
path: root/lib/libpthread/machdep/hpux-9.03/__signal.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/machdep/hpux-9.03/__signal.h')
-rwxr-xr-xlib/libpthread/machdep/hpux-9.03/__signal.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/libpthread/machdep/hpux-9.03/__signal.h b/lib/libpthread/machdep/hpux-9.03/__signal.h
new file mode 100755
index 00000000000..fbb1d6ce2b1
--- /dev/null
+++ b/lib/libpthread/machdep/hpux-9.03/__signal.h
@@ -0,0 +1,28 @@
+#include <sys/signal.h>
+
+#ifndef SIGCLD
+#define SIGCLD SIGCHLD
+#endif
+
+/* #define sigmask(n) ((unsigned int)1 << (((n) - 1) & (32 - 1))) */
+#define sigword(n) (((unsigned int)((n) - 1))>>5)
+
+#define __SIGEMPTYSET { 0, 0, 0, 0, 0, 0, 0, 0 }
+#define __SIGFILLSET { 0xffffffff,0xffffffff,0xffffffff,0xffffffff,\
+ 0xffffffff,0xffffffff,0xffffffff,0xffffffff}
+#define __SIGADDSET(s, n) ((s)->sigset[sigword(n)] |= sigmask(n))
+#define __SIGDELSET(s, n) ((s)->sigset[sigword(n)] &= ~sigmask(n))
+#define __SIGISMEMBER(s, n) ((s)->sigset[sigword(n)] & sigmask(n))
+
+#define SIGSET_SIZE sizeof(sigset_t)/sizeof(long)
+
+#define SIG_ANY(sig) sig_any(&sig)
+
+static inline int sig_any(sigset_t *sig) {
+ int i;
+ for (i=0; i < SIGSET_SIZE; i++)
+ if (sig->sigset[i] != 0)
+ return 1;
+ return 0;
+}
+