LF OS
Hobby operating system for amd64 with high ambitions
Loading...
Searching...
No Matches
condvar.c File Reference

(7c4d7d1 userspace/term: change eyecandy inclusion to use objcopy instead of xxd)

#include <condvar.h>
#include <tpa.h>
#include <vm.h>
#include <log.h>
#include <scheduler.h>
#include <unused_param.h>
+ Include dependency graph for condvar.c:

Go to the source code of this file.

Data Structures

struct  condvar_data
 

Functions

void init_condvar (void)
 
void sc_handle_locking_create_condvar (uint64_t *cv, uint64_t *e)
 
void sc_handle_locking_destroy_condvar (uint64_t condvar, uint64_t *e)
 
void sc_handle_locking_signal_condvar (uint64_t condvar, uint64_t amount, uint64_t *e)
 
void sc_handle_locking_wait_condvar (uint64_t condvar, uint64_t timeout, uint64_t *e)
 

Variables

static tpa_tcondvars
 
static uint64_t next_condvar = 1
 

Data Structure Documentation

◆ condvar_data

struct condvar_data

Definition at line 8 of file condvar.c.

+ Collaboration diagram for condvar_data:
Data Fields
uint64_t wait_count Number of processes currently waiting on this condvar.

Function Documentation

◆ init_condvar()

void init_condvar ( void  )

Definition at line 16 of file condvar.c.

References condvars, kernel_alloc, and tpa_new().

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

◆ sc_handle_locking_create_condvar()

void sc_handle_locking_create_condvar ( uint64_t cv,
uint64_t e 
)

Definition at line 20 of file condvar.c.

References condvars, logd, logw, next_condvar, tpa_set(), and condvar_data::wait_count.

+ Here is the call graph for this function:

◆ sc_handle_locking_destroy_condvar()

void sc_handle_locking_destroy_condvar ( uint64_t  condvar,
uint64_t e 
)

Definition at line 38 of file condvar.c.

References condvar, condvars, logd, next_condvar, tpa_get(), tpa_set(), and condvar_data::wait_count.

+ Here is the call graph for this function:

◆ sc_handle_locking_signal_condvar()

void sc_handle_locking_signal_condvar ( uint64_t  condvar,
uint64_t  amount,
uint64_t e 
)

Definition at line 55 of file condvar.c.

References amount, condvar, wait_data::condvar, condvars, scheduler_waitable_done(), tpa_get(), condvar_data::wait_count, and wait_reason_condvar.

+ Here is the call graph for this function:

◆ sc_handle_locking_wait_condvar()

void sc_handle_locking_wait_condvar ( uint64_t  condvar,
uint64_t  timeout,
uint64_t e 
)

Definition at line 72 of file condvar.c.

References condvar, wait_data::condvar, condvars, scheduler_wait_for(), timeout, tpa_get(), UNUSED_PARAM, condvar_data::wait_count, and wait_reason_condvar.

+ Here is the call graph for this function:

Variable Documentation

◆ condvars

tpa_t* condvars
static

Definition at line 13 of file condvar.c.

◆ next_condvar

uint64_t next_condvar = 1
static

Definition at line 14 of file condvar.c.