FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_ktrace.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/condvar.h>
#include <sys/sched.h>
#include <sys/signalvar.h>
#include <sys/sleepqueue.h>
#include <sys/resourcevar.h>
Go to the source code of this file.
Macros | |
#define | CV_WAITERS_BOUND INT_MAX |
#define | CV_WAITERS_INC(cvp) |
#define | CV_ASSERT(cvp, lock, td) |
Functions | |
__FBSDID ("$FreeBSD$") | |
void | cv_init (struct cv *cvp, const char *desc) |
void | cv_destroy (struct cv *cvp) |
void | _cv_wait (struct cv *cvp, struct lock_object *lock) |
void | _cv_wait_unlock (struct cv *cvp, struct lock_object *lock) |
int | _cv_wait_sig (struct cv *cvp, struct lock_object *lock) |
int | _cv_timedwait_sbt (struct cv *cvp, struct lock_object *lock, sbintime_t sbt, sbintime_t pr, int flags) |
int | _cv_timedwait_sig_sbt (struct cv *cvp, struct lock_object *lock, sbintime_t sbt, sbintime_t pr, int flags) |
void | cv_signal (struct cv *cvp) |
void | cv_broadcastpri (struct cv *cvp, int pri) |
#define CV_ASSERT | ( | cvp, | |
lock, | |||
td | |||
) |
Definition at line 66 of file kern_condvar.c.
#define CV_WAITERS_BOUND INT_MAX |
Definition at line 56 of file kern_condvar.c.
#define CV_WAITERS_INC | ( | cvp | ) |
Definition at line 58 of file kern_condvar.c.
__FBSDID | ( | "$FreeBSD$" | ) |
int _cv_timedwait_sbt | ( | struct cv * | cvp, |
struct lock_object * | lock, | ||
sbintime_t | sbt, | ||
sbintime_t | pr, | ||
int | flags | ||
) |
Definition at line 273 of file kern_condvar.c.
References CV_ASSERT, CV_WAITERS_INC, flags, Giant, pr, sleepq_add(), sleepq_lock(), sleepq_release(), sleepq_set_timeout_sbt(), and sleepq_timedwait().
int _cv_timedwait_sig_sbt | ( | struct cv * | cvp, |
struct lock_object * | lock, | ||
sbintime_t | sbt, | ||
sbintime_t | pr, | ||
int | flags | ||
) |
Definition at line 335 of file kern_condvar.c.
References CV_ASSERT, CV_WAITERS_INC, flags, Giant, pr, sleepq_add(), sleepq_lock(), sleepq_release(), sleepq_set_timeout_sbt(), and sleepq_timedwait_sig().
void _cv_wait | ( | struct cv * | cvp, |
struct lock_object * | lock | ||
) |
Definition at line 109 of file kern_condvar.c.
References CV_ASSERT, CV_WAITERS_INC, Giant, sleepq_add(), sleepq_lock(), sleepq_release(), and sleepq_wait().
int _cv_wait_sig | ( | struct cv * | cvp, |
struct lock_object * | lock | ||
) |
Definition at line 213 of file kern_condvar.c.
References CV_ASSERT, CV_WAITERS_INC, Giant, sleepq_add(), sleepq_lock(), sleepq_release(), and sleepq_wait_sig().
void _cv_wait_unlock | ( | struct cv * | cvp, |
struct lock_object * | lock | ||
) |
Definition at line 164 of file kern_condvar.c.
References CV_ASSERT, CV_WAITERS_INC, Giant, sleepq_add(), sleepq_lock(), sleepq_release(), and sleepq_wait().
void cv_broadcastpri | ( | struct cv * | cvp, |
int | pri | ||
) |
Definition at line 424 of file kern_condvar.c.
References sleepq_broadcast(), sleepq_lock(), and sleepq_release().
Referenced by doselwakeup(), and logtimeout().
void cv_destroy | ( | struct cv * | cvp | ) |
Definition at line 89 of file kern_condvar.c.
References sleepq_lock(), sleepq_lookup(), and sleepq_release().
Referenced by ksem_drop(), seltdfini(), sema_destroy(), sendfile_sync_destroy(), and tty_dealloc().
void cv_init | ( | struct cv * | cvp, |
const char * | desc | ||
) |
Definition at line 77 of file kern_condvar.c.
Referenced by devinit(), ksem_alloc(), log_drvinit(), proc_init(), pts_alloc(), pts_alloc_external(), seltdinit(), sema_init(), tty_alloc_mutex(), vn_sendfile(), and vntblinit().
void cv_signal | ( | struct cv * | cvp | ) |
Definition at line 398 of file kern_condvar.c.
References CV_WAITERS_BOUND, sleepq_lock(), sleepq_lookup(), sleepq_release(), and sleepq_signal().
Referenced by _sema_post(), sendfile_sync_signal(), sys_ksem_post(), and ttydev_write().