Makes a single attempt to acquire the resource protected by a semaphore.
#include <nks/synch.h> NXBool_t NXSemaTryWait ( NXSema_t *sema);
(IN) Points to the semaphore to acquire.
If the semaphore count is greater than zero, NXSemaTryWait decrements the semaphore count and returns TRUE to indicate a successful acquisition of the resource. If the semaphore count is less than or equal to zero, the semaphore cannot be immediately acquired. Because NXSemaTryWait cannot block and wait for the resource to become available, the function returns FALSE to indicate failure and does not modify the semaphore count.