From 3234f9c00faaa91b829b763a816540a21c101867 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Tue, 10 Nov 1998 08:41:41 +0000 Subject: [PATCH] New macro for building a linker set of things to do at module unload time (eg: disconnect malloc types contained within a module), opposite of SYSINIT(). --- sys/sys/kernel.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index 00aa4301079..2ff321b7348 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * @(#)kernel.h 8.3 (Berkeley) 1/21/94 - * $Id: kernel.h,v 1.42 1998/10/09 23:03:27 peter Exp $ + * $Id: kernel.h,v 1.43 1998/10/16 03:55:01 peter Exp $ */ #ifndef _SYS_KERNEL_H_ @@ -247,6 +247,18 @@ struct sysinit { SI_TYPE_DEFAULT \ }; \ DATA_SET(sysinit_set,uniquifier ## _sys_init); +/* + * Called on module unload: no special processing + */ +#define SYSUNINIT(uniquifier, subsystem, order, func, ident) \ + static struct sysinit uniquifier ## _sys_uninit = { \ + subsystem, \ + order, \ + func, \ + ident, \ + SI_TYPE_DEFAULT \ + }; \ + DATA_SET(sysuninit_set,uniquifier ## _sys_uninit); /* * Call 'fork()' before calling '(*func)(ident)';