Source-Changes-HG archive

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

[src/netbsd-2-0]: src/sys/sys Pull up revision 1.12 (requested by matt in tic...



details:   https://anonhg.NetBSD.org/src/rev/2d51feec9a8e
branches:  netbsd-2-0
changeset: 560249:2d51feec9a8e
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Apr 05 20:37:56 2004 +0000

description:
Pull up revision 1.12 (requested by matt in ticket #56):
Add the notion of an "empty" ksiginfo_t (one where on signo is filled
in).
Add an initializer for them: KSI_INIT_EMPTY
Add a predicate for them: KSI_EMPTY_P
Don't bother storing empty ksiginfo_t's since they have no information.
Change uses of KSI_INIT to KSI_INIT_EMPTY where no other information
other
than the signo is being filled in.

diffstat:

 sys/sys/siginfo.h |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (43 lines):

diff -r 76192d6d0fb4 -r 2d51feec9a8e sys/sys/siginfo.h
--- a/sys/sys/siginfo.h Mon Apr 05 20:37:50 2004 +0000
+++ b/sys/sys/siginfo.h Mon Apr 05 20:37:56 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siginfo.h,v 1.11 2004/01/06 12:41:43 christos Exp $     */
+/*     $NetBSD: siginfo.h,v 1.11.2.1 2004/04/05 20:37:56 tron Exp $     */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -96,6 +96,7 @@
 } ksiginfo_t;
 
 #define        KSI_TRAP        0x01    /* signal caused by trap */
+#define        KSI_EMPTY       0x02    /* no additional information */
 
 /* Macros to initialize a ksiginfo_t. */
 #define        KSI_INIT(ksi)                                                   \
@@ -103,10 +104,16 @@
        memset((ksi), 0, sizeof(*(ksi)));                               \
 } while (/*CONSTCOND*/0)
 
+#define        KSI_INIT_EMPTY(ksi)                                             \
+do {                                                                   \
+       KSI_INIT((ksi));                                                \
+       (ksi)->ksi_flags = KSI_EMPTY;                                   \
+} while (/*CONSTCOND*/0)
+
 #define        KSI_INIT_TRAP(ksi)                                              \
 do {                                                                   \
        KSI_INIT((ksi));                                                \
-       (ksi)->ksi_flags |= KSI_TRAP;                                   \
+       (ksi)->ksi_flags = KSI_TRAP;                                    \
 } while (/*CONSTCOND*/0)
 
 /* Copy the part of ksiginfo_t without the queue pointers */
@@ -119,6 +126,7 @@
 
 /* Predicate macros to test how a ksiginfo_t was generated. */
 #define        KSI_TRAP_P(ksi)         (((ksi)->ksi_flags & KSI_TRAP) != 0)
+#define        KSI_EMPTY_P(ksi)        (((ksi)->ksi_flags & KSI_EMPTY) != 0)
 
 /*
  * Old-style signal handler "code" arguments were only non-zero for



Home | Main Index | Thread Index | Old Index