Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys expose module_{lookup,enqueue}()
details: https://anonhg.NetBSD.org/src/rev/96246ffaf6f9
branches: trunk
changeset: 748789:96246ffaf6f9
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Nov 05 14:09:14 2009 +0000
description:
expose module_{lookup,enqueue}()
diffstat:
sys/kern/kern_module.c | 9 +++++----
sys/sys/module.h | 5 ++++-
2 files changed, 9 insertions(+), 5 deletions(-)
diffs (60 lines):
diff -r 9e33509cff02 -r 96246ffaf6f9 sys/kern/kern_module.c
--- a/sys/kern/kern_module.c Thu Nov 05 13:32:14 2009 +0000
+++ b/sys/kern/kern_module.c Thu Nov 05 14:09:14 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_module.c,v 1.52 2009/10/16 00:27:07 jnemeth Exp $ */
+/* $NetBSD: kern_module.c,v 1.53 2009/11/05 14:09:14 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.52 2009/10/16 00:27:07 jnemeth Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.53 2009/11/05 14:09:14 pooka Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -84,7 +84,6 @@
static modinfo_t module_dummy;
__link_set_add_rodata(modules, module_dummy);
-static module_t *module_lookup(const char *);
static int module_do_load(const char *, bool, int, prop_dictionary_t,
module_t **, modclass_t class, bool);
static int module_do_unload(const char *);
@@ -452,11 +451,13 @@
*
* Put a module onto the global list and update counters.
*/
-static void
+void
module_enqueue(module_t *mod)
{
int i;
+ KASSERT(mutex_owned(&module_lock));
+
/*
* If there are requisite modules, put at the head of the queue.
* This is so that autounload can unload requisite modules with
diff -r 9e33509cff02 -r 96246ffaf6f9 sys/sys/module.h
--- a/sys/sys/module.h Thu Nov 05 13:32:14 2009 +0000
+++ b/sys/sys/module.h Thu Nov 05 14:09:14 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: module.h,v 1.16 2009/10/02 18:50:14 elad Exp $ */
+/* $NetBSD: module.h,v 1.17 2009/11/05 14:09:14 pooka Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -130,6 +130,9 @@
int module_find_section(const char *, void **, size_t *);
void module_thread_kick(void);
+void module_enqueue(module_t *);
+module_t * module_lookup(const char *);
+
void module_whatis(uintptr_t, void (*)(const char *, ...));
void module_print_list(void (*)(const char *, ...));
#else /* _KERNEL */
Home |
Main Index |
Thread Index |
Old Index