Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/osf1 clean up sigset_t manipulation macros



details:   https://anonhg.NetBSD.org/src/rev/12f50b156af6
branches:  trunk
changeset: 472697:12f50b156af6
user:      cgd <cgd%NetBSD.org@localhost>
date:      Wed May 05 00:57:43 1999 +0000

description:
clean up sigset_t manipulation macros

diffstat:

 sys/compat/osf1/osf1.h        |  10 ++++++++--
 sys/compat/osf1/osf1_cvt.c    |   8 +-------
 sys/compat/osf1/osf1_signal.c |   7 +------
 3 files changed, 10 insertions(+), 15 deletions(-)

diffs (74 lines):

diff -r b2a61a709b03 -r 12f50b156af6 sys/compat/osf1/osf1.h
--- a/sys/compat/osf1/osf1.h    Wed May 05 00:48:30 1999 +0000
+++ b/sys/compat/osf1/osf1.h    Wed May 05 00:57:43 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1.h,v 1.16 1999/05/04 02:44:43 cgd Exp $ */
+/* $NetBSD: osf1.h,v 1.17 1999/05/05 00:57:43 cgd Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -387,7 +387,7 @@
 };
 
 
-/* signal.h */
+/* signal.h (some in machine/signal.h) */
 
 struct osf1_sigaction {
        osf1_fcn_ptr    sa_handler;
@@ -418,6 +418,12 @@
 #define OSF1_SS_NOMASK         0x00000004
 #define OSF1_SS_UCONTEXT       0x00000008
 
+/* signal set manipulation macros */
+#define osf1_sigmask(n)                ((osf1_sigset_t)1 << ((n) - 1))
+#define osf1_sigemptyset(s)    (*(s) = (osf1_sigset_t)0)
+#define osf1_sigismember(s, n) (*(s) & osf1_sigmask(n))
+#define osf1_sigaddset(s, n)   (*(s) |= osf1_sigmask(n))
+
 
 /* socket.h */
 
diff -r b2a61a709b03 -r 12f50b156af6 sys/compat/osf1/osf1_cvt.c
--- a/sys/compat/osf1/osf1_cvt.c        Wed May 05 00:48:30 1999 +0000
+++ b/sys/compat/osf1/osf1_cvt.c        Wed May 05 00:57:43 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_cvt.c,v 1.4 1999/05/05 00:48:30 cgd Exp $ */
+/* $NetBSD: osf1_cvt.c,v 1.5 1999/05/05 00:57:43 cgd Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -90,12 +90,6 @@
 #include <compat/osf1/osf1_util.h>
 #include <compat/osf1/osf1_cvt.h>
 
-/* XXX these don't belong here */
-#define osf1_sigmask(n)                (1UL << ((n) - 1))
-#define osf1_sigemptyset(s)    memset((s), 0, sizeof(*(s)))
-#define osf1_sigismember(s, n) (*(s) & osf1_sigmask(n))
-#define osf1_sigaddset(s, n)   (*(s) |= osf1_sigmask(n))
-
 const struct emul_flags_xtab osf1_access_flags_xtab[] = {
 #if 0 /* pseudo-flag */
     {  OSF1_F_OK,              OSF1_F_OK,              F_OK            },
diff -r b2a61a709b03 -r 12f50b156af6 sys/compat/osf1/osf1_signal.c
--- a/sys/compat/osf1/osf1_signal.c     Wed May 05 00:48:30 1999 +0000
+++ b/sys/compat/osf1/osf1_signal.c     Wed May 05 00:57:43 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: osf1_signal.c,v 1.14 1999/05/01 02:57:11 cgd Exp $     */
+/*     $NetBSD: osf1_signal.c,v 1.15 1999/05/05 00:57:43 cgd Exp $     */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -50,11 +50,6 @@
 #include <compat/osf1/osf1_util.h>
 #include <compat/osf1/osf1_cvt.h>
 
-#define osf1_sigmask(n)                (1UL << ((n) - 1))
-#define osf1_sigemptyset(s)    memset((s), 0, sizeof(*(s)))
-#define osf1_sigismember(s, n) (*(s) & osf1_sigmask(n))
-#define osf1_sigaddset(s, n)   (*(s) |= osf1_sigmask(n))
-
 int
 osf1_sys_sigaction(p, v, retval)
        struct proc *p;



Home | Main Index | Thread Index | Old Index