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 ("$BSDSUniX$") | |
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) |
Referenced by khelp_destroy_osd(), khelp_get_id(), khelp_init_osd(), and khelp_new_hhook_registered().
#define KHELP_LIST_RUNLOCK | ( | ) | rw_runlock(&khelp_list_lock) |
Referenced by khelp_destroy_osd(), khelp_get_id(), khelp_init_osd(), and khelp_new_hhook_registered().
#define KHELP_LIST_WLOCK | ( | ) | rw_wlock(&khelp_list_lock) |
Referenced by khelp_deregister_helper(), and TAILQ_HEAD().
#define KHELP_LIST_WUNLOCK | ( | ) | rw_wunlock(&khelp_list_lock) |
Referenced by khelp_deregister_helper(), and TAILQ_HEAD().
__FBSDID | ( | "$BSDSUniX$" | ) |
int khelp_add_hhook | ( | struct hookinfo * | hki, |
uint32_t | flags | ||
) |
Definition at line 257 of file kern_khelp.c.
References hhook_add_hook_lookup().
int khelp_deregister_helper | ( | struct helper * | h | ) |
Definition at line 119 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 186 of file kern_khelp.c.
References KHELP_LIST_RLOCK, KHELP_LIST_RUNLOCK, and khelp_remove_osd().
int32_t khelp_get_id | ( | char * | hname | ) |
Definition at line 237 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 230 of file kern_khelp.c.
References osd_get().
int khelp_init_osd | ( | uint32_t | classes, |
struct osd * | hosd | ||
) |
Definition at line 149 of file kern_khelp.c.
References KHELP_LIST_RLOCK, KHELP_LIST_RUNLOCK, khelp_remove_osd(), and osd_set().
int khelp_modevent | ( | module_t | mod, |
int | event_type, | ||
void * | data | ||
) |
Definition at line 315 of file kern_khelp.c.
References khelp_deregister_helper(), and printf().
void khelp_new_hhook_registered | ( | struct hhook_head * | hhh, |
uint32_t | flags | ||
) |
Definition at line 289 of file kern_khelp.c.
References 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 271 of file kern_khelp.c.
References hhook_remove_hook_lookup().
|
inlinestatic |
Definition at line 210 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 57 of file kern_khelp.c.
References hhook_add_hook_lookup(), hhook_remove_hook_lookup(), KHELP_LIST_WLOCK, KHELP_LIST_WUNLOCK, osd_deregister(), osd_register(), and printf().
|
static |
Definition at line 54 of file kern_khelp.c.