|
FreeBSD kernel kern code
|
#include <sys/cdefs.h>#include <sys/param.h>#include <sys/kernel.h>#include <sys/systm.h>#include <sys/sysctl.h>#include <sys/errno.h>#include <sys/jail.h>#include <sys/malloc.h>#include <sys/lock.h>#include <sys/mutex.h>#include <sys/rmlock.h>#include <sys/sx.h>#include <sys/queue.h>#include <sys/proc.h>#include <sys/osd.h>
Go to the source code of this file.
Macros | |
| #define | OSD_DEBUG(...) |
Functions | |
| __FBSDID ("$BSDSUniX$") | |
| static | MALLOC_DEFINE (M_OSD,"osd","Object Specific Data") |
| TUNABLE_INT ("debug.osd",&osd_debug) | |
| SYSCTL_INT (_debug, OID_AUTO, osd, CTLFLAG_RW,&osd_debug, 0,"OSD debug level") | |
| static void | do_osd_del (u_int type, struct osd *osd, u_int slot, int list_locked) |
| static | LIST_HEAD (osd) |
| static void | osd_default_destructor (void *value __unused) |
| int | osd_register (u_int type, osd_destructor_t destructor, osd_method_t *methods) |
| void | osd_deregister (u_int type, u_int slot) |
| int | osd_set (u_int type, struct osd *osd, u_int slot, void *value) |
| void * | osd_get (u_int type, struct osd *osd, u_int slot) |
| void | osd_del (u_int type, struct osd *osd, u_int slot) |
| int | osd_call (u_int type, u_int method, void *obj, void *data) |
| void | osd_exit (u_int type, struct osd *osd) |
| static void | osd_init (void *arg __unused) |
| SYSINIT (osd, SI_SUB_LOCK, SI_ORDER_ANY, osd_init, NULL) | |
Variables | |
| static int | osd_debug = 0 |
| static struct sx | osd_module_lock [OSD_LAST+1] |
| static struct rmlock | osd_object_lock [OSD_LAST+1] |
| static struct mtx | osd_list_lock [OSD_LAST+1] |
| #define OSD_DEBUG | ( | ... | ) |
Definition at line 53 of file kern_osd.c.
Referenced by do_osd_del(), osd_deregister(), osd_exit(), osd_get(), osd_register(), and osd_set().
| __FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 287 of file kern_osd.c.
References free(), OSD_DEBUG, osd_list_lock, realloc(), and type.
Referenced by osd_del(), osd_deregister(), and osd_exit().


|
static |
Definition at line 72 of file kern_osd.c.
|
static |
| int osd_call | ( | u_int | type, |
| u_int | method, | ||
| void * | obj, | ||
| void * | data | ||
| ) |
Definition at line 339 of file kern_osd.c.
References osd_module_lock, and type.
|
static |
Definition at line 85 of file kern_osd.c.
Referenced by osd_register().

| void osd_del | ( | u_int | type, |
| struct osd * | osd, | ||
| u_int | slot | ||
| ) |
Definition at line 277 of file kern_osd.c.
References do_osd_del(), and osd_object_lock.
Referenced by khelp_remove_osd().


| void osd_deregister | ( | u_int | type, |
| u_int | slot | ||
| ) |
Definition at line 148 of file kern_osd.c.
References do_osd_del(), OSD_DEBUG, osd_list_lock, osd_module_lock, osd_object_lock, realloc(), and type.
Referenced by khelp_deregister_helper(), and TAILQ_HEAD().


| void osd_exit | ( | u_int | type, |
| struct osd * | osd | ||
| ) |
Definition at line 364 of file kern_osd.c.
References do_osd_del(), OSD_DEBUG, and osd_object_lock.

| void* osd_get | ( | u_int | type, |
| struct osd * | osd, | ||
| u_int | slot | ||
| ) |
Definition at line 254 of file kern_osd.c.
References OSD_DEBUG, osd_object_lock, and value.
Referenced by hhook_run_hooks(), khelp_get_osd(), and khelp_remove_osd().

|
static |
Definition at line 389 of file kern_osd.c.
References mtx_init(), osd_list_lock, osd_module_lock, osd_object_lock, and rm_init().

| int osd_register | ( | u_int | type, |
| osd_destructor_t | destructor, | ||
| osd_method_t * | methods | ||
| ) |
Definition at line 91 of file kern_osd.c.
References free(), malloc(), OSD_DEBUG, osd_default_destructor(), osd_module_lock, osd_object_lock, realloc(), and type.
Referenced by TAILQ_HEAD().


| int osd_set | ( | u_int | type, |
| struct osd * | osd, | ||
| u_int | slot, | ||
| void * | value | ||
| ) |
Definition at line 196 of file kern_osd.c.
References malloc(), OSD_DEBUG, osd_list_lock, osd_object_lock, realloc(), and value.
Referenced by khelp_init_osd().


| SYSCTL_INT | ( | _debug | , |
| OID_AUTO | , | ||
| osd | , | ||
| CTLFLAG_RW | , | ||
| & | osd_debug, | ||
| 0 | , | ||
| "OSD debug level" | |||
| ) |
| SYSINIT | ( | osd | , |
| SI_SUB_LOCK | , | ||
| SI_ORDER_ANY | , | ||
| osd_init | , | ||
| NULL | |||
| ) |
| TUNABLE_INT | ( | "debug.osd" | , |
| & | osd_debug | ||
| ) |
|
static |
Definition at line 49 of file kern_osd.c.
|
static |
Definition at line 82 of file kern_osd.c.
Referenced by do_osd_del(), osd_deregister(), osd_init(), and osd_set().
|
static |
Definition at line 80 of file kern_osd.c.
Referenced by osd_call(), osd_deregister(), osd_init(), and osd_register().
|
static |
Definition at line 81 of file kern_osd.c.
Referenced by osd_del(), osd_deregister(), osd_exit(), osd_get(), osd_init(), osd_register(), and osd_set().