FreeBSD kernel kern code
kern_sema.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ktr.h>
#include <sys/condvar.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sema.h>
Include dependency graph for kern_sema.c:

Go to the source code of this file.

Functions

 __FBSDID ("$BSDSUniX$")
 
void sema_init (struct sema *sema, int value, const char *description)
 
void sema_destroy (struct sema *sema)
 
void _sema_post (struct sema *sema, const char *file, int line)
 
void _sema_wait (struct sema *sema, const char *file, int line)
 
int _sema_timedwait (struct sema *sema, int timo, const char *file, int line)
 
int _sema_trywait (struct sema *sema, const char *file, int line)
 
int sema_value (struct sema *sema)
 

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
void _sema_post ( struct sema sema,
const char *  file,
int  line 
)

Definition at line 76 of file kern_sema.c.

References cv_signal().

Here is the call graph for this function:

int _sema_timedwait ( struct sema sema,
int  timo,
const char *  file,
int  line 
)

Definition at line 109 of file kern_sema.c.

int _sema_trywait ( struct sema sema,
const char *  file,
int  line 
)

Definition at line 143 of file kern_sema.c.

void _sema_wait ( struct sema sema,
const char *  file,
int  line 
)

Definition at line 91 of file kern_sema.c.

void sema_destroy ( struct sema sema)

Definition at line 63 of file kern_sema.c.

References cv_destroy(), and mtx_destroy().

Referenced by aio_unload().

Here is the call graph for this function:

Here is the caller graph for this function:

void sema_init ( struct sema sema,
int  value,
const char *  description 
)

Definition at line 48 of file kern_sema.c.

References cv_init(), mtx_init(), and value.

Referenced by aio_onceonly().

Here is the call graph for this function:

Here is the caller graph for this function:

int sema_value ( struct sema sema)

Definition at line 168 of file kern_sema.c.