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 ("$FreeBSD$")
 
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()

__FBSDID ( "$FreeBSD$"  )

◆ _sema_post()

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

Definition at line 78 of file kern_sema.c.

References cv_signal(), and sema.

Here is the call graph for this function:

◆ _sema_timedwait()

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

Definition at line 111 of file kern_sema.c.

References sema.

◆ _sema_trywait()

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

Definition at line 145 of file kern_sema.c.

References sema.

◆ _sema_wait()

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

Definition at line 93 of file kern_sema.c.

References sema.

◆ sema_destroy()

void sema_destroy ( struct sema sema)

Definition at line 65 of file kern_sema.c.

References cv_destroy(), and sema.

Here is the call graph for this function:

◆ sema_init()

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

Definition at line 50 of file kern_sema.c.

References cv_init(), sema, and value.

Referenced by aio_onceonly().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sema_value()

int sema_value ( struct sema sema)

Definition at line 170 of file kern_sema.c.

References sema.