next up previous contents
Next: Semaphore Wait Up: Semaphore Library Previous: Semaphore Library   Contents

Semaphore Initialization

int sema_init(struct sema * sem,int val);

This functions is used to initialize the semaphore. The first arguement sema, is a pointer to the semaphore variable to be initialzed. The count associated with the semaphore is set initially to val.


Soumyadeb Mitra 2002-08-07