Loading [MathJax]/extensions/tex2jax.js
CS350 COS
COS
All Data Structures Files Functions Variables Typedefs Macros
cv.h File Reference

Go to the source code of this file.

Data Structures

struct  CV
 

Typedefs

typedef struct CV CV
 

Functions

void CV_Init (CV *cv, const char *name)
 
void CV_Destroy (CV *cv)
 
void CV_Wait (CV *cv, Mutex *mtx)
 
void CV_Signal (CV *cv)
 
void CV_Broadcast (CV *cv)
 

Data Structure Documentation

◆ CV

struct CV

Definition at line 5 of file cv.h.

Collaboration diagram for CV:
[legend]
Data Fields
WaitChannel chan

Typedef Documentation

◆ CV

typedef struct CV CV

Function Documentation

◆ CV_Broadcast()

void CV_Broadcast ( CV cv)

CV_Broadcast –

Wake all threads waiting on the condition.

Definition at line 70 of file cv.c.

71{
72 /* XXXFILLMEIN */
73}

◆ CV_Destroy()

void CV_Destroy ( CV cv)

Definition at line 33 of file cv.c.

34{
36
37 return;
38}
WaitChannel chan
Definition: cv.h:6
void WaitChannel_Destroy(WaitChannel *wc)
Definition: waitchannel.c:40
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CV_Init()

void CV_Init ( CV cv,
const char *  name 
)

Definition at line 25 of file cv.c.

26{
27 WaitChannel_Init(&cv->chan, name);
28
29 return;
30}
void WaitChannel_Init(WaitChannel *wc, const char *name)
Definition: waitchannel.c:28
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CV_Signal()

void CV_Signal ( CV cv)

CV_Signal –

Wake a single thread waiting on the condition.

Definition at line 59 of file cv.c.

60{
61 /* XXXFILLMEIN */
62}
Here is the caller graph for this function:

◆ CV_Wait()

void CV_Wait ( CV cv,
Mutex mtx 
)

CV_Wait –

Wait to be woken up on a condition.

Definition at line 46 of file cv.c.

47{
48 /* Do not go to sleep holding a spinlock! */
49 ASSERT(Critical_Level() == 0);
50 /* XXXFILLMEIN */
51}
uint32_t Critical_Level()
Definition: critical.c:45
#define ASSERT(_x)
Definition: kassert.h:8
Here is the call graph for this function: