NXThreadGetId

Returns the thread identifier for the calling thread.

Library:LibC
Classification:NKS
Service:Threads

Syntax

  #include <nks/thread.h>
   
  NXThreadId_t NXThreadGetId ( void );
  

Return Values

Returns the thread identifier of the calling thread or NX_INVALID_THREAD_ID (if no NKS context is present on the calling NetWare thread).

Remarks

The thread ID is unique to the VM and is not a system-wide unique ID. To get a system-wide ID, you can combine the thread ID with the VM ID (see NWVmGetId).

For sample code, see ThrCreat.c.

See Also