NXCondInit

Initializes a specified condition variable.

Library:LibC
Classification:NKS
Service:Synchronization

Syntax

  #include <nks/synch.h>
   
  int NXCondInit (
     NXCond_t  *cond, 
     void      *arg);
  

Parameters

cond

(IN) Points to the condition variable to be initialized.

arg

(IN) Is reserved for future use. Set to NULL.

Return Values

If successful, returns zero; otherwise, returns a nonzero error code:

Decimal

Hex

Constant

Description

5

0x05

NX_ENOMEM

Insufficient memory to complete the call

Remarks

Condition variables can be used to support event-based synchronization where a lock or a semaphore might not be appropriate.

If you call NXCondInit on a previously initialized condition variable, no warning is given unless you are in DEBUG mode.

See Also