Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ wait(2) — Purdue Xinu

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

scount(2)

screate(2)

sdelete(2)

signal(2)

sreset(2)

WAIT(2)

NAME

wait − block and wait until semaphore signalled

SYNOPSIS

int wait(sem)
int sem;

DESCRIPTION

Wait decrements the count of semaphore sem, blocking the calling process if the count goes negative by enqueuing it in the queue for sem.  The only ways to get free from a semaphore queue are for some other process to signal the semaphore, or for some other process to delete or reset the semaphore.  Wait and SIGNAL(2) are the two basic synchronization primitives in the system. 

Wait returns SYSERR if sem is invalid.  Otherwise, it returns OK once freed from the queue. 

SEE ALSO

scount(2), screate(2), sdelete(2), signal(2), sreset(2)

December 01, 1986  —  Xinu Programmer’s Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026