|
FreeBSD kernel kern code
|
#include "opt_compat.h"#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 |
Macros | |
| #define | MOD_EVENT(mod, type) (mod)->handler((mod), (type), (mod)->arg) |
Functions | |
| __FBSDID ("$BSDSUniX$") | |
| 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, 0) | |
| 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, __BSDSUniX_version) | |
Definition at line 61 of file kern_module.c.
Referenced by module_quiesce(), module_register_init(), module_shutdown(), and module_unload().
| __FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
| linker_file_t module_file | ( | module_t | mod | ) |
Definition at line 303 of file kern_module.c.
| module_t module_getfnext | ( | module_t | mod | ) |
Definition at line 279 of file kern_module.c.
Referenced by linker_file_unload().

| int module_getid | ( | module_t | mod | ) |
Definition at line 271 of file kern_module.c.
Referenced by sys_kldfirstmod(), and sys_modfind().

| const char* module_getname | ( | module_t | mod | ) |
Definition at line 287 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 234 of file kern_module.c.
Referenced by sys_modfnext(), sys_modnext(), and sys_modstat().

| module_t module_lookupbyname | ( | const char * | name | ) |
Definition at line 218 of file kern_module.c.
Referenced by module_register(), module_register_init(), and sys_modfind().

| int module_quiesce | ( | module_t | mod | ) |
Definition at line 247 of file kern_module.c.
References Giant, and MOD_EVENT.
Referenced by linker_file_unload().

| void module_reference | ( | module_t | mod | ) |
Definition at line 188 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 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 Giant, MOD_EVENT, module_lookupbyname(), module_release(), panic(), and printf().

| void module_release | ( | module_t | mod | ) |
Definition at line 198 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 295 of file kern_module.c.
Referenced by 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 260 of file kern_module.c.
References Giant, and MOD_EVENT.
Referenced by linker_file_unload().

| MODULE_VERSION | ( | kernel | , |
| __BSDSUniX_version | |||
| ) |
| int sys_modfind | ( | struct thread * | td, |
| struct modfind_args * | uap | ||
| ) |
Definition at line 427 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 344 of file kern_module.c.
References module_lookupbyid().

| int sys_modnext | ( | struct thread * | td, |
| struct modnext_args * | uap | ||
| ) |
Definition at line 313 of file kern_module.c.
References module_lookupbyid().

| int sys_modstat | ( | struct thread * | td, |
| struct modstat_args * | uap | ||
| ) |
Definition at line 374 of file kern_module.c.
References module_lookupbyid(), and name.

| SYSINIT | ( | module | , |
| SI_SUB_KLD | , | ||
| SI_ORDER_FIRST | , | ||
| module_init | , | ||
| 0 | |||
| ) |
|
static |
Definition at line 63 of file kern_module.c.