Acquires the resource protected by a semaphore, blocking if necessary.
#include <nks/synch.h> void NXSemaWait ( NXSema_t *sema);
(IN) Points to the semaphore to acquire.
The NXSemaWait function decrements the semaphore value:
If the semaphore value is zero or greater, and the calling thread returns having acquired the resource.
If the semaphore value is negative, the calling thread blocks on the semaphore and waits until the resource is available.
For sample code, see Library.c.