Module Name: src
Committed By: pooka
Date: Thu Mar 18 17:33:18 UTC 2010
Modified Files:
src/sys/kern: kern_module.c
Log Message:
Never autounload builtin modules (they will never be autoloaded if disabled).
To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/kern/kern_module.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/kern/kern_module.c
diff -u src/sys/kern/kern_module.c:1.60 src/sys/kern/kern_module.c:1.61
--- src/sys/kern/kern_module.c:1.60 Fri Mar 5 20:10:05 2010
+++ src/sys/kern/kern_module.c Thu Mar 18 17:33:18 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_module.c,v 1.60 2010/03/05 20:10:05 pooka Exp $ */
+/* $NetBSD: kern_module.c,v 1.61 2010/03/18 17:33:18 pooka Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.60 2010/03/05 20:10:05 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.61 2010/03/18 17:33:18 pooka Exp $");
#define _MODULE_INTERNAL
@@ -1170,6 +1170,8 @@
mutex_enter(&module_lock);
for (mod = TAILQ_FIRST(&module_list); mod != NULL; mod = next) {
next = TAILQ_NEXT(mod, mod_chain);
+ if (mod->mod_source == MODULE_SOURCE_KERNEL)
+ continue;
if (uvmexp.free < uvmexp.freemin) {
module_thread_ticks = hz;
} else if (mod->mod_autotime == 0) {