Deleted Added
full compact
kern_module.c (132199) kern_module.c (134092)
1/*-
2 * Copyright (c) 1997 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997 Doug Rabson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/kern/kern_module.c 132199 2004-07-15 08:26:07Z phk $");
28__FBSDID("$FreeBSD: head/sys/kern/kern_module.c 134092 2004-08-20 21:47:48Z truckman $");
29
30#include <sys/param.h>
31#include <sys/kernel.h>
32#include <sys/systm.h>
33#include <sys/eventhandler.h>
34#include <sys/malloc.h>
35#include <sys/sysproto.h>
36#include <sys/sysent.h>
37#include <sys/proc.h>
38#include <sys/lock.h>
39#include <sys/mutex.h>
29
30#include <sys/param.h>
31#include <sys/kernel.h>
32#include <sys/systm.h>
33#include <sys/eventhandler.h>
34#include <sys/malloc.h>
35#include <sys/sysproto.h>
36#include <sys/sysent.h>
37#include <sys/proc.h>
38#include <sys/lock.h>
39#include <sys/mutex.h>
40#include <sys/reboot.h>
40#include <sys/sx.h>
41#include <sys/module.h>
42#include <sys/linker.h>
43
44static MALLOC_DEFINE(M_MODULE, "module", "module data structures");
45
46typedef TAILQ_HEAD(, module) modulelist_t;
47struct module {

--- 41 unchanged lines hidden (view full) ---

89
90SYSINIT(module, SI_SUB_KLD, SI_ORDER_FIRST, module_init, 0)
91
92static void
93module_shutdown(void *arg1, int arg2)
94{
95 module_t mod;
96
41#include <sys/sx.h>
42#include <sys/module.h>
43#include <sys/linker.h>
44
45static MALLOC_DEFINE(M_MODULE, "module", "module data structures");
46
47typedef TAILQ_HEAD(, module) modulelist_t;
48struct module {

--- 41 unchanged lines hidden (view full) ---

90
91SYSINIT(module, SI_SUB_KLD, SI_ORDER_FIRST, module_init, 0)
92
93static void
94module_shutdown(void *arg1, int arg2)
95{
96 module_t mod;
97
98 if (arg2 & RB_NOSYNC)
99 return;
97 MOD_SLOCK;
98 TAILQ_FOREACH(mod, &modules, link)
99 MOD_EVENT(mod, MOD_SHUTDOWN);
100 MOD_SUNLOCK;
101}
102
103void
104module_register_init(const void *arg)

--- 305 unchanged lines hidden ---
100 MOD_SLOCK;
101 TAILQ_FOREACH(mod, &modules, link)
102 MOD_EVENT(mod, MOD_SHUTDOWN);
103 MOD_SUNLOCK;
104}
105
106void
107module_register_init(const void *arg)

--- 305 unchanged lines hidden ---