Xinu7/man/man2/sreset.doc




SRESET(2)           Xinu Programmer's Manual            SRESET(2)



NAME
     sreset - reset semaphore count

SYNOPSIS
     int sreset(sem,count)
     int sem;
     int count;

DESCRIPTION
     _S_r_e_s_e_t frees processes in the queue for semaphore _s_e_m, and
     resets its count to _c_o_u_n_t. This corresponds to the opera-
     tions of sdelete(sem) and sem=screate(count), except that it
     guarantees that the semaphore id _s_e_m does not change.
     _S_r_e_s_e_t returns SYSERR if _s_e_m is not a valid semaphore id.
     The current count in a semaphore does not affect resetting
     it.

SEE ALSO
     scount(2), screate(2), sdelete(2), signal(2), wait(2)




































Version 6b               Printed 1/12/87                        1