Module Name: src Committed By: reinoud Date: Mon Sep 5 11:09:38 UTC 2011
Modified Files: src/sys/arch/usermode/include: thunk.h src/sys/arch/usermode/usermode: thunk.c Log Message: Add thunk_sigaddset() To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/usermode/include/thunk.h cvs rdiff -u -r1.32 -r1.33 src/sys/arch/usermode/usermode/thunk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/usermode/include/thunk.h diff -u src/sys/arch/usermode/include/thunk.h:1.28 src/sys/arch/usermode/include/thunk.h:1.29 --- src/sys/arch/usermode/include/thunk.h:1.28 Sun Sep 4 21:08:18 2011 +++ src/sys/arch/usermode/include/thunk.h Mon Sep 5 11:09:38 2011 @@ -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 <jmcne...@invisible.ca> @@ -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 *); Index: src/sys/arch/usermode/usermode/thunk.c diff -u src/sys/arch/usermode/usermode/thunk.c:1.32 src/sys/arch/usermode/usermode/thunk.c:1.33 --- src/sys/arch/usermode/usermode/thunk.c:1.32 Sun Sep 4 21:08:18 2011 +++ src/sys/arch/usermode/usermode/thunk.c Mon Sep 5 11:09:38 2011 @@ -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 <jmcne...@invisible.ca> @@ -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)) {