Allocates and initializes a semaphore.
#include <nks/synch.h> NXSema_t *NXSemaAlloc ( unsigned int count, void *arg);
(IN) Specifies the number of instances of a given resources to be protected by the semaphore.
(IN) Is reserved for future use. Set to NULL.
If successful, returns a pointer to the allocated and initialized semaphore; otherwise, returns a NULL pointer.
Semaphores can be used to control access to a set of resources.
The NXSemaAlloc function allocates and initializes the semaphore. Do not call NXSemaInit to initialize the semaphore.
For sample code, see Library.c.