FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/eventhandler.h>
#include <sys/malloc.h>
#include <sys/sysproto.h>
#include <sys/sysent.h>
#include <sys/proc.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/reboot.h>
#include <sys/sx.h>
#include <sys/module.h>
#include <sys/linker.h>
Go to the source code of this file.
Data Structures | |
struct | module |
struct | module_stat_v1 |
struct | module_stat_v2 |
Macros | |
#define | MOD_EVENT(mod, type) (mod)->handler((mod), (type), (mod)->arg) |
Functions | |
__FBSDID ("$FreeBSD$") | |
static | MALLOC_DEFINE (M_MODULE, "module", "module data structures") |
static | TAILQ_HEAD (modulelist, module) |
static void | module_init (void *arg) |
SYSINIT (module, SI_SUB_KLD, SI_ORDER_FIRST, module_init, NULL) | |
static void | module_shutdown (void *arg1, int arg2) |
void | module_register_init (const void *arg) |
int | module_register (const moduledata_t *data, linker_file_t container) |
void | module_reference (module_t mod) |
void | module_release (module_t mod) |
module_t | module_lookupbyname (const char *name) |
module_t | module_lookupbyid (int modid) |
int | module_quiesce (module_t mod) |
int | module_unload (module_t mod) |
int | module_getid (module_t mod) |
module_t | module_getfnext (module_t mod) |
const char * | module_getname (module_t mod) |
void | module_setspecific (module_t mod, modspecific_t *datap) |
linker_file_t | module_file (module_t mod) |
int | sys_modnext (struct thread *td, struct modnext_args *uap) |
int | sys_modfnext (struct thread *td, struct modfnext_args *uap) |
int | sys_modstat (struct thread *td, struct modstat_args *uap) |
int | sys_modfind (struct thread *td, struct modfind_args *uap) |
MODULE_VERSION (kernel, __FreeBSD_version) | |
Definition at line 61 of file kern_module.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
linker_file_t module_file | ( | module_t | mod | ) |
Definition at line 299 of file kern_module.c.
module_t module_getfnext | ( | module_t | mod | ) |
Definition at line 275 of file kern_module.c.
Referenced by linker_file_unload().
int module_getid | ( | module_t | mod | ) |
Definition at line 267 of file kern_module.c.
Referenced by sys_kldfirstmod(), and sys_modfind().
const char * module_getname | ( | module_t | mod | ) |
Definition at line 283 of file kern_module.c.
Referenced by linker_file_unload().
|
static |
Definition at line 83 of file kern_module.c.
References module_shutdown().
module_t module_lookupbyid | ( | int | modid | ) |
Definition at line 230 of file kern_module.c.
Referenced by sys_modfnext(), sys_modnext(), and sys_modstat().
module_t module_lookupbyname | ( | const char * | name | ) |
Definition at line 214 of file kern_module.c.
References name.
Referenced by module_register(), module_register_init(), and sys_modfind().
int module_quiesce | ( | module_t | mod | ) |
Definition at line 243 of file kern_module.c.
References Giant, and MOD_EVENT.
Referenced by linker_file_unload().
void module_reference | ( | module_t | mod | ) |
Definition at line 184 of file kern_module.c.
int module_register | ( | const moduledata_t * | data, |
linker_file_t | container | ||
) |
Definition at line 152 of file kern_module.c.
References data, malloc(), module_lookupbyname(), and printf().
Referenced by linker_file_register_modules().
void module_register_init | ( | const void * | arg | ) |
Definition at line 110 of file kern_module.c.
References data, Giant, MOD_EVENT, module_lookupbyname(), module_release(), panic(), and printf().
void module_release | ( | module_t | mod | ) |
Definition at line 194 of file kern_module.c.
References free(), and panic().
Referenced by linker_file_unload(), and module_register_init().
void module_setspecific | ( | module_t | mod, |
modspecific_t * | datap | ||
) |
Definition at line 291 of file kern_module.c.
Referenced by kern_syscall_module_handler().
|
static |
Definition at line 95 of file kern_module.c.
References Giant, and MOD_EVENT.
Referenced by module_init().
int module_unload | ( | module_t | mod | ) |
Definition at line 256 of file kern_module.c.
References Giant, and MOD_EVENT.
Referenced by linker_file_unload().
MODULE_VERSION | ( | kernel | , |
__FreeBSD_version | |||
) |
int sys_modfind | ( | struct thread * | td, |
struct modfind_args * | uap | ||
) |
Definition at line 450 of file kern_module.c.
References module_getid(), module_lookupbyname(), and name.
int sys_modfnext | ( | struct thread * | td, |
struct modfnext_args * | uap | ||
) |
Definition at line 340 of file kern_module.c.
References module_lookupbyid().
int sys_modnext | ( | struct thread * | td, |
struct modnext_args * | uap | ||
) |
Definition at line 309 of file kern_module.c.
References module_lookupbyid().
int sys_modstat | ( | struct thread * | td, |
struct modstat_args * | uap | ||
) |
Definition at line 378 of file kern_module.c.
References module_stat_v2::data, data, module_stat_v2::id, module_lookupbyid(), name, module_stat_v2::refs, module_stat_v1::version, and module_stat_v2::version.
SYSINIT | ( | module | , |
SI_SUB_KLD | , | ||
SI_ORDER_FIRST | , | ||
module_init | , | ||
NULL | |||
) |
|
static |
Definition at line 63 of file kern_module.c.