NXSemaDeinit

Deinitializes the specified semaphore.

Library:LibC
Classification:NKS
Service:Synchronization

Syntax

  #include <nks/synch.h>
   
  void NXSemaDeinit (
     NXSema_t  *sema);
  

Parameters

sema

(IN) Points to the semaphore to deinitialize.

Remarks

The semaphore being deinitialized must have been initialized by calling NXSemaInit. The NXSemaDeinit function does not release the memory for the semaphore, but it does release the memory allocated with the NXSemaInit function.

You must free the memory for the semaphore with the function that is paired with the function you used to allocate the memory. For example, if you used malloc to allocate the semaphore, use free to release the memory.

See Also