NX_LOCK_INFO_ALLOC

Declares and initializes a variable of type NXLockInfo_t.

Library:LibC
Classification:NKS
Service:Synchronization

Syntax

  #include <nks/synch.h>
   
  #define NX_LOCK_INFO_ALLOC (
     NXLockInfo_t   var,
     const char    *name,
     unsigned long  flags);
  

Parameters

var

(IN) Specifies the name of the variable to be declared.

name

(IN) Points to the name to be associated with this NXLockInfo_t object (no longer than NX_MAX_OBJECT_NAME_LEN).

flags

(IN) Specifies the flags to be associated with the NXLockInfo_t object.

Remarks

NX_LOCK_INFO_ALLOC is a macro that declares a variable of type NXLockInfo_t, and initializes the variable with the values passed as arguments to the macro.

This interface is only active when compiling with the DEBUG option. Otherwise, it becomes nothing and the arguments passed to NXMutexAlloc, NXRwLockAlloc, etc., become NULL.

For sample code, see Mutex.c.

See Also

Example

  NX_LOCK_INFO_ALLOC(mInfo, "Linked-list Lock", 0);