int Ns_WaitForSemaphore( Ns_Semaphore * sema );
static Ns_Semaphore sem; void
Init(void) { Ns_InitializeSemaphore(&sem, 0); } void Waiter(void) { Ns_WaitForSemaphore(&sem); ... access resource ... } void Releaser(void) { Ns_ReleaseSemaphore(&sem, 1); }