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.
Data Structures | |
struct | osd_master |
Macros | |
#define | OSD_DEBUG(...) |
Functions | |
__FBSDID ("$FreeBSD$") | |
static | MALLOC_DEFINE (M_OSD, "osd", "Object Specific Data") |
SYSCTL_INT (_debug, OID_AUTO, osd, CTLFLAG_RWTUN, &osd_debug, 0, "OSD debug level") | |
static void | do_osd_del (u_int type, struct osd *osd, u_int slot, int list_locked) |
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_reserve (u_int slot) |
int | osd_set_reserved (u_int type, struct osd *osd, u_int slot, void **rsv, void *value) |
void | osd_free_reserved (void **rsv) |
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 |
struct osd_master | osdm [OSD_LAST+1] |
#define OSD_DEBUG | ( | ... | ) |
Definition at line 71 of file kern_osd.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 332 of file kern_osd.c.
References free(), OSD_DEBUG, osdm, realloc(), and type.
Referenced by osd_del(), osd_deregister(), and osd_exit().
|
static |
int osd_call | ( | u_int | type, |
u_int | method, | ||
void * | obj, | ||
void * | data | ||
) |
Definition at line 384 of file kern_osd.c.
|
static |
Definition at line 90 of file kern_osd.c.
Referenced by osd_register().
void osd_del | ( | u_int | type, |
struct osd * | osd, | ||
u_int | slot | ||
) |
Definition at line 322 of file kern_osd.c.
References do_osd_del(), osdm, and type.
Referenced by khelp_remove_osd().
void osd_deregister | ( | u_int | type, |
u_int | slot | ||
) |
Definition at line 153 of file kern_osd.c.
References do_osd_del(), OSD_DEBUG, osdm, realloc(), and type.
Referenced by khelp_deregister_helper().
void osd_exit | ( | u_int | type, |
struct osd * | osd | ||
) |
Definition at line 409 of file kern_osd.c.
References do_osd_del(), OSD_DEBUG, osdm, and type.
void osd_free_reserved | ( | void ** | rsv | ) |
Definition at line 290 of file kern_osd.c.
References free(), and OSD_DEBUG.
Referenced by msg_prison_set(), msginit(), osd_set_reserved(), sem_prison_set(), seminit(), shm_prison_set(), and shminit().
void * osd_get | ( | u_int | type, |
struct osd * | osd, | ||
u_int | slot | ||
) |
Definition at line 298 of file kern_osd.c.
References OSD_DEBUG, osdm, type, and value.
Referenced by hhook_run_hooks(), khelp_get_osd(), and khelp_remove_osd().
|
static |
Definition at line 434 of file kern_osd.c.
References osdm, and rm_init().
int osd_register | ( | u_int | type, |
osd_destructor_t | destructor, | ||
osd_method_t * | methods | ||
) |
Definition at line 96 of file kern_osd.c.
References free(), malloc(), OSD_DEBUG, osd_default_destructor(), osd_master::osd_module_lock, osd_master::osd_object_lock, osdm, realloc(), and type.
void ** osd_reserve | ( | u_int | slot | ) |
Definition at line 209 of file kern_osd.c.
References malloc(), and OSD_DEBUG.
Referenced by msg_prison_set(), msginit(), sem_prison_set(), seminit(), shm_prison_set(), and shminit().
int osd_set | ( | u_int | type, |
struct osd * | osd, | ||
u_int | slot, | ||
void * | value | ||
) |
Definition at line 202 of file kern_osd.c.
References osd_set_reserved(), type, and value.
Referenced by khelp_init_osd().
int osd_set_reserved | ( | u_int | type, |
struct osd * | osd, | ||
u_int | slot, | ||
void ** | rsv, | ||
void * | value | ||
) |
Definition at line 219 of file kern_osd.c.
References free(), OSD_DEBUG, osd_free_reserved(), osdm, realloc(), type, and value.
Referenced by osd_set().
SYSCTL_INT | ( | _debug | , |
OID_AUTO | , | ||
osd | , | ||
CTLFLAG_RWTUN | , | ||
& | osd_debug, | ||
0 | , | ||
"OSD debug level" | |||
) |
SYSINIT | ( | osd | , |
SI_SUB_LOCK | , | ||
SI_ORDER_ANY | , | ||
osd_init | , | ||
NULL | |||
) |
|
static |
Definition at line 68 of file kern_osd.c.
struct osd_master osdm[OSD_LAST+1] |
Definition at line 85 of file kern_osd.c.
Referenced by do_osd_del(), osd_call(), osd_del(), osd_deregister(), osd_exit(), osd_get(), osd_init(), osd_register(), and osd_set_reserved().