FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/hhook.h>
#include <sys/khelp.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/module_khelp.h>
#include <sys/osd.h>
#include <sys/queue.h>
#include <sys/refcount.h>
#include <sys/rwlock.h>
#include <sys/systm.h>
Go to the source code of this file.
Macros | |
#define | KHELP_LIST_WLOCK() rw_wlock(&khelp_list_lock) |
#define | KHELP_LIST_WUNLOCK() rw_wunlock(&khelp_list_lock) |
#define | KHELP_LIST_RLOCK() rw_rlock(&khelp_list_lock) |
#define | KHELP_LIST_RUNLOCK() rw_runlock(&khelp_list_lock) |
#define | KHELP_LIST_LOCK_ASSERT() rw_assert(&khelp_list_lock, RA_LOCKED) |
Functions | |
__FBSDID ("$FreeBSD$") | |
RW_SYSINIT (khelplistlock, &khelp_list_lock, "helper list lock") | |
static | TAILQ_HEAD (helper_head, helper) |
int | khelp_deregister_helper (struct helper *h) |
int | khelp_init_osd (uint32_t classes, struct osd *hosd) |
int | khelp_destroy_osd (struct osd *hosd) |
static void | khelp_remove_osd (struct helper *h, struct osd *hosd) |
void * | khelp_get_osd (struct osd *hosd, int32_t id) |
int32_t | khelp_get_id (char *hname) |
int | khelp_add_hhook (struct hookinfo *hki, uint32_t flags) |
int | khelp_remove_hhook (struct hookinfo *hki) |
void | khelp_new_hhook_registered (struct hhook_head *hhh, uint32_t flags) |
int | khelp_modevent (module_t mod, int event_type, void *data) |
Variables | |
static struct rwlock | khelp_list_lock |
#define KHELP_LIST_LOCK_ASSERT | ( | ) | rw_assert(&khelp_list_lock, RA_LOCKED) |
#define KHELP_LIST_RLOCK | ( | ) | rw_rlock(&khelp_list_lock) |
#define KHELP_LIST_RUNLOCK | ( | ) | rw_runlock(&khelp_list_lock) |
#define KHELP_LIST_WLOCK | ( | ) | rw_wlock(&khelp_list_lock) |
#define KHELP_LIST_WUNLOCK | ( | ) | rw_wunlock(&khelp_list_lock) |
__FBSDID | ( | "$FreeBSD$" | ) |
int khelp_add_hhook | ( | struct hookinfo * | hki, |
uint32_t | flags | ||
) |
Definition at line 259 of file kern_khelp.c.
References flags, and hhook_add_hook_lookup().
int khelp_deregister_helper | ( | struct helper * | h | ) |
Definition at line 121 of file kern_khelp.c.
References hhook_remove_hook_lookup(), KHELP_LIST_WLOCK, KHELP_LIST_WUNLOCK, and osd_deregister().
Referenced by khelp_modevent().
int khelp_destroy_osd | ( | struct osd * | hosd | ) |
Definition at line 188 of file kern_khelp.c.
References KHELP_LIST_RLOCK, KHELP_LIST_RUNLOCK, and khelp_remove_osd().
Referenced by sodealloc().
int32_t khelp_get_id | ( | char * | hname | ) |
Definition at line 239 of file kern_khelp.c.
References KHELP_LIST_RLOCK, and KHELP_LIST_RUNLOCK.
void * khelp_get_osd | ( | struct osd * | hosd, |
int32_t | id | ||
) |
Definition at line 232 of file kern_khelp.c.
References osd_get().
int khelp_init_osd | ( | uint32_t | classes, |
struct osd * | hosd | ||
) |
Definition at line 151 of file kern_khelp.c.
References classes, KHELP_LIST_RLOCK, KHELP_LIST_RUNLOCK, khelp_remove_osd(), and osd_set().
Referenced by soalloc().
int khelp_modevent | ( | module_t | mod, |
int | event_type, | ||
void * | data | ||
) |
Definition at line 317 of file kern_khelp.c.
References data, khelp_deregister_helper(), and printf().
void khelp_new_hhook_registered | ( | struct hhook_head * | hhh, |
uint32_t | flags | ||
) |
Definition at line 291 of file kern_khelp.c.
References flags, hhook_add_hook(), KHELP_LIST_RLOCK, KHELP_LIST_RUNLOCK, and printf().
Referenced by hhook_head_register().
int khelp_remove_hhook | ( | struct hookinfo * | hki | ) |
Definition at line 273 of file kern_khelp.c.
References hhook_remove_hook_lookup().
|
inlinestatic |
Definition at line 212 of file kern_khelp.c.
References osd_del(), and osd_get().
Referenced by khelp_destroy_osd(), and khelp_init_osd().
RW_SYSINIT | ( | khelplistlock | , |
& | khelp_list_lock, | ||
"helper list lock" | |||
) |
|
static |
Definition at line 59 of file kern_khelp.c.
|
static |
Definition at line 56 of file kern_khelp.c.