* the most common case: the semaphore is free or locked
* by the calling process itself. Rearranging this code
* is probably a bad idea.
* the most common case: the semaphore is free or locked
* by the calling process itself. Rearranging this code
* is probably a bad idea.
{
/* Append calling process to the wait queue */
ADDTAIL(&s->wait_queue, (Node *)CurrentProcess);
{
/* Append calling process to the wait queue */
ADDTAIL(&s->wait_queue, (Node *)CurrentProcess);
- /* We will awake only when the current owner calls
- * ReleaseSemaphore(). Then, the semaphore will already
+ /*
+ * We will wake up only when the current owner calls
+ * sem_release(). Then, the semaphore will already
* the most common case: the semaphore has been locked just
* once and nobody else was waiting for it. Rearranging
* this code is probably a bad idea.
* the most common case: the semaphore has been locked just
* once and nobody else was waiting for it. Rearranging
* this code is probably a bad idea.