Sat Aug 27 21:14:15 2011 UTC ()
Add a thunk_atexit() so ucontext() ends can be dealt with as they should


(reinoud)
diff -r1.17 -r1.18 src/sys/arch/usermode/include/thunk.h
diff -r1.19 -r1.20 src/sys/arch/usermode/usermode/thunk.c

cvs diff -r1.17 -r1.18 src/sys/arch/usermode/include/thunk.h (expand / switch to context diff)
--- src/sys/arch/usermode/include/thunk.h 2011/08/25 11:06:29 1.17
+++ src/sys/arch/usermode/include/thunk.h 2011/08/27 21:14:15 1.18
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.h,v 1.17 2011/08/25 11:06:29 jmcneill Exp $ */
+/* $NetBSD: thunk.h,v 1.18 2011/08/27 21:14:15 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
@@ -77,6 +77,7 @@
 
 int	thunk_sigaction(int, const struct sigaction *, struct sigaction *);
 void	thunk_signal(int, void (*)(int));
+int	thunk_atexit(void (*function)(void));
 
 int	thunk_aio_read(struct aiocb *);
 int	thunk_aio_write(struct aiocb *);

cvs diff -r1.19 -r1.20 src/sys/arch/usermode/usermode/thunk.c (expand / switch to context diff)
--- src/sys/arch/usermode/usermode/thunk.c 2011/08/25 11:06:29 1.19
+++ src/sys/arch/usermode/usermode/thunk.c 2011/08/27 21:14:15 1.20
@@ -1,4 +1,4 @@
-/* $NetBSD: thunk.c,v 1.19 2011/08/25 11:06:29 jmcneill Exp $ */
+/* $NetBSD: thunk.c,v 1.20 2011/08/27 21:14:15 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: thunk.c,v 1.19 2011/08/25 11:06:29 jmcneill Exp $");
+__RCSID("$NetBSD: thunk.c,v 1.20 2011/08/27 21:14:15 reinoud Exp $");
 
 #include <sys/types.h>
 #include <sys/ansi.h>
@@ -262,6 +262,12 @@
 thunk_signal(int sig, void (*func)(int))
 {
 	signal(sig, func);
+}
+
+int
+thunk_atexit(void (*function)(void))
+{
+	return atexit(function);
 }
 
 int