#include <kernel.h>#include <semaphore.h>#include <queue.h>

Go to the source code of this file.
Functions | |
| syscall | freesem (semaphore sem) |
Definition in file freesem.c.
| syscall freesem | ( | semaphore | sem | ) |
freesem - deallocate a semaphore. Reset the semaphore count, releasing any processes in the waiting queue. Deallocate entry in global semaphore table.
| sem | id of semaphore to be released |
Definition at line 21 of file freesem.c.
References sentry::count, dequeue(), disable(), isbadsem, nonempty, OK, sentry::queue, ready(), RESCHED_NO, restore(), semtab, SFREE, sentry::state, and SYSERR.
Referenced by test_deltaQueue(), test_procQueue(), test_semaphore(), test_semaphore2(), test_semaphore3(), and test_semaphore4().
1.5.5