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 a wrapper for signal(3)



details:   https://anonhg.NetBSD.org/src/rev/ac1bf2bf31a3
branches:  trunk
changeset: 768656:ac1bf2bf31a3
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Aug 23 21:55:21 2011 +0000

description:
add a wrapper for signal(3)

diffstat:

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

diffs (48 lines):

diff -r 978c8188b7ef -r ac1bf2bf31a3 sys/arch/usermode/include/thunk.h
--- a/sys/arch/usermode/include/thunk.h Tue Aug 23 20:27:22 2011 +0000
+++ b/sys/arch/usermode/include/thunk.h Tue Aug 23 21:55:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.h,v 1.14 2011/08/23 17:12:32 jmcneill Exp $ */
+/* $NetBSD: thunk.h,v 1.15 2011/08/23 21:55:21 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -76,6 +76,7 @@
 int    thunk_unlink(const char *);
 
 int    thunk_sigaction(int, const struct sigaction *, struct sigaction *);
+void   thunk_signal(int, void (*)(int));
 
 int    thunk_aio_read(struct aiocb *);
 int    thunk_aio_write(struct aiocb *);
diff -r 978c8188b7ef -r ac1bf2bf31a3 sys/arch/usermode/usermode/thunk.c
--- a/sys/arch/usermode/usermode/thunk.c        Tue Aug 23 20:27:22 2011 +0000
+++ b/sys/arch/usermode/usermode/thunk.c        Tue Aug 23 21:55:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.c,v 1.16 2011/08/23 18:36:08 reinoud Exp $ */
+/* $NetBSD: thunk.c,v 1.17 2011/08/23 21:55:21 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: thunk.c,v 1.16 2011/08/23 18:36:08 reinoud Exp $");
+__RCSID("$NetBSD: thunk.c,v 1.17 2011/08/23 21:55:21 jmcneill Exp $");
 
 #include <sys/types.h>
 #include <sys/ansi.h>
@@ -258,6 +258,12 @@
        return sigaction(sig, act, oact);
 }
 
+void
+thunk_signal(int sig, void (*func)(int))
+{
+       signal(sig, func);
+}
+
 int
 thunk_aio_read(struct aiocb *aiocbp)
 {



Home | Main Index | Thread Index | Old Index