FreeBSD kernel kern code
subr_lock.c File Reference
#include <sys/cdefs.h>
#include "opt_ddb.h"
#include "opt_mprof.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/lock_profile.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/pcpu.h>
#include <sys/proc.h>
#include <sys/sbuf.h>
#include <sys/sched.h>
#include <sys/smp.h>
#include <sys/sysctl.h>
#include <machine/cpufunc.h>
Include dependency graph for subr_lock.c:

Go to the source code of this file.

Functions

 __FBSDID ("$BSDSUniX$")
 
 CTASSERT (LOCK_CLASS_MAX==15)
 
void lock_init (struct lock_object *lock, struct lock_class *class, const char *name, const char *type, int flags)
 
void lock_destroy (struct lock_object *lock)
 

Variables

struct lock_class * lock_classes [LOCK_CLASS_MAX+1]
 

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
CTASSERT ( LOCK_CLASS_MAX  = =15)
void lock_destroy ( struct lock_object *  lock)

Definition at line 97 of file subr_lock.c.

Referenced by lockdestroy(), mtx_destroy(), rm_destroy(), rw_destroy(), and sx_destroy().

Here is the caller graph for this function:

void lock_init ( struct lock_object *  lock,
struct lock_class *  class,
const char *  name,
const char *  type,
int  flags 
)

Definition at line 72 of file subr_lock.c.

References lock_classes, and name.

Referenced by lockinit(), mtx_init(), rm_init_flags(), rw_init_flags(), and sx_init_flags().

Here is the caller graph for this function:

Variable Documentation

struct lock_class* lock_classes[LOCK_CLASS_MAX+1]
Initial value:
= {
}
struct lock_class lock_class_rm_sleepable
Definition: kern_rmlock.c:100
struct lock_class lock_class_mtx_spin
Definition: kern_mutex.c:122
struct lock_class lock_class_rm
Definition: kern_rmlock.c:86
struct lock_class lock_class_rw
Definition: kern_rwlock.c:79
struct lock_class lock_class_sx
Definition: kern_sx.c:130
struct lock_class lock_class_mtx_sleep
Definition: kern_mutex.c:109
struct lock_class lock_class_lockmgr
Definition: kern_lock.c:156

Definition at line 61 of file subr_lock.c.

Referenced by lock_init().