Xinu7/man/man2/screate.doc
SCREATE(2) Xinu Programmer's Manual SCREATE(2)
NAME
screate - create a new semaphore
SYNOPSIS
int screate(count)
int count;
DESCRIPTION
_S_c_r_e_a_t_e creates a counting semaphore and initializes it to
_c_o_u_n_t. If successful, _s_c_r_e_a_t_e returns the integer identifier
of the new semaphore. It returns SYSERR if no more sema-
phores can be allocated or if _c_o_u_n_t is less than zero.
Semaphores are manipulated with WAIT(2) and SIGNAL(2) to
synchronize processes. Waiting causes the semaphore count
to be decremented; decrementing a semaphore count past zero
causes a process to be blocked. Signaling a semaphore
increases its count, freeing a blocked process if one is
waiting.
SEE ALSO
scount(2), sdelete(2), signal(2), sreset(2), wait(2)
Version 6b Printed 1/12/87 1