Initializes a semaphore.
#include <nks/synch.h> int NXSemaInit ( NXSema_t *sema, unsigned int count, void *arg);
(IN) Points to the semaphore to initialize.
(IN) Specifies the number of resources that the semaphore will protect and control.
(IN) Reserved for future use. Set to NULL.
If successful, returns zero; otherwise, returns a nonzero error code:
Semaphores can be used to control access to a set of resources.
If you call NXSemaInit on a previously initialized semaphore, no warning is given unless you are in DEBUG mode.