CS350 COS
COS
|
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <sys/kassert.h>
#include <sys/kconfig.h>
#include <sys/kdebug.h>
#include <sys/ktime.h>
#include <sys/mp.h>
#include <sys/spinlock.h>
#include <sys/semaphore.h>
#include <sys/thread.h>
Go to the source code of this file.
Functions | |
LIST_HEAD (SemaListHead, Semaphore) | |
void | Semaphore_Destroy (Semaphore *sema) |
void | Semaphore_Acquire (Semaphore *sema) |
void | Semaphore_Release (Semaphore *sema) |
bool | Semaphore_TryAcquire (Semaphore *sema) |
void | Debug_Semaphores (int argc, const char *argv[]) |
REGISTER_DBGCMD (semaphores, "Display list of semaphores", Debug_Semaphores) | |
Variables | |
Spinlock | semaListLock = { 0, 0, 0, 0, 0, 0, 0, 0, "Semaphore List" } |
void Debug_Semaphores | ( | int | argc, |
const char * | argv[] | ||
) |
Definition at line 102 of file semaphore.c.
LIST_HEAD | ( | SemaListHead | , |
Semaphore | |||
) |
Definition at line 20 of file semaphore.c.
REGISTER_DBGCMD | ( | semaphores | , |
"Display list of semaphores" | , | ||
Debug_Semaphores | |||
) |
void Semaphore_Acquire | ( | Semaphore * | sema | ) |
Definition at line 49 of file semaphore.c.
void Semaphore_Destroy | ( | Semaphore * | sema | ) |
Definition at line 39 of file semaphore.c.
void Semaphore_Release | ( | Semaphore * | sema | ) |
Definition at line 72 of file semaphore.c.
Definition at line 89 of file semaphore.c.
Spinlock semaListLock = { 0, 0, 0, 0, 0, 0, 0, 0, "Semaphore List" } |
Definition at line 19 of file semaphore.c.