Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/usermode Add thunk_sigaddset()



details:   https://anonhg.NetBSD.org/src/rev/e1a097a5011b
branches:  trunk
changeset: 769265:e1a097a5011b
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Mon Sep 05 11:09:38 2011 +0000

description:
Add thunk_sigaddset()

diffstat:

 sys/arch/usermode/include/thunk.h  |   3 ++-
 sys/arch/usermode/usermode/thunk.c |  15 +++++++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r 3b4a91071939 -r e1a097a5011b sys/arch/usermode/include/thunk.h
--- a/sys/arch/usermode/include/thunk.h Mon Sep 05 09:57:02 2011 +0000
+++ b/sys/arch/usermode/include/thunk.h Mon Sep 05 11:09:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.h,v 1.28 2011/09/04 21:08:18 jmcneill Exp $ */
+/* $NetBSD: thunk.h,v 1.29 2011/09/05 11:09:38 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -108,6 +108,7 @@
 void   thunk_signal(int, void (*)(int));
 int    thunk_sigblock(int);
 int    thunk_sigunblock(int);
+void   thunk_sigaddset(sigset_t *sa_mask, int sig);
 int    thunk_atexit(void (*function)(void));
 
 int    thunk_aio_read(struct aiocb *);
diff -r 3b4a91071939 -r e1a097a5011b sys/arch/usermode/usermode/thunk.c
--- a/sys/arch/usermode/usermode/thunk.c        Mon Sep 05 09:57:02 2011 +0000
+++ b/sys/arch/usermode/usermode/thunk.c        Mon Sep 05 11:09:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.c,v 1.32 2011/09/04 21:08:18 jmcneill Exp $ */
+/* $NetBSD: thunk.c,v 1.33 2011/09/05 11:09:38 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifdef __NetBSD__
-__RCSID("$NetBSD: thunk.c,v 1.32 2011/09/04 21:08:18 jmcneill Exp $");
+__RCSID("$NetBSD: thunk.c,v 1.33 2011/09/05 11:09:38 reinoud Exp $");
 #endif
 
 #include <sys/types.h>
@@ -406,6 +406,17 @@
        return sigprocmask(SIG_UNBLOCK, &set, NULL);
 }
 
+void
+thunk_sigaddset(sigset_t *sa_mask, int sig)
+{
+       int retval;
+       retval = sigaddset(sa_mask, sig);
+       if (retval < 0) {
+               perror("%s: bad signal added");
+               abort();
+       }
+}
+
 int
 thunk_atexit(void (*function)(void))
 {



Home | Main Index | Thread Index | Old Index