CS350 COS
COS
|
#include <sys/cdefs.h>
#include <sys/queue.h>
Go to the source code of this file.
Data Structures | |
struct | WaitChannel |
Macros | |
#define | WAITCHANNEL_NAMELEN 32 |
Typedefs | |
typedef struct WaitChannel | WaitChannel |
Functions | |
void | WaitChannel_EarlyInit () |
void | WaitChannel_Init (WaitChannel *wc, const char *name) |
void | WaitChannel_Destroy (WaitChannel *wc) |
void | WaitChannel_Lock (WaitChannel *wc) __LOCK_EX(wc -> lock) |
void | WaitChannel_Sleep (WaitChannel *wc) __UNLOCK_EX(wc -> lock) |
void | WaitChannel_Wake (WaitChannel *wc) |
void | WaitChannel_WakeAll (WaitChannel *wc) |
#define WAITCHANNEL_NAMELEN 32 |
Definition at line 8 of file waitchannel.h.
typedef struct WaitChannel WaitChannel |
void WaitChannel_Destroy | ( | WaitChannel * | wc | ) |
Definition at line 40 of file waitchannel.c.
void WaitChannel_EarlyInit | ( | ) |
void WaitChannel_Init | ( | WaitChannel * | wc, |
const char * | name | ||
) |
Definition at line 28 of file waitchannel.c.
void WaitChannel_Lock | ( | WaitChannel * | wchan | ) |
WaitChannel_Lock –
Acquires the wait channel lock.
Definition at line 57 of file waitchannel.c.
void WaitChannel_Sleep | ( | WaitChannel * | wchan | ) |
WaitChannel_Sleep –
Places the current thread to asleep while releasing the wait channel lock.
Side Effect: Retains a reference to thread until the thread is woken up.
Definition at line 71 of file waitchannel.c.
void WaitChannel_Wake | ( | WaitChannel * | wchan | ) |
WaitChannel_Wake –
Wake up a single thread.
Side Effects: Releases the thread reference once complete.
Definition at line 91 of file waitchannel.c.
void WaitChannel_WakeAll | ( | WaitChannel * | wchan | ) |
WaitChannel_WakeAll –
Wakes up all threads currently sleeping on the wait channel.
Side Effects: Releases all thread references.
Definition at line 116 of file waitchannel.c.