NXThreadGetContext

Returns the context for a specified thread ID.

Library:LibC
Classification:NKS
Service:Threads

Syntax

  #include <nks/thread.h>
   
  int NXThreadGetContext (
     NXThreadId_t   tid,
     NXContext_t   *ctx);
  

Parameters

tid

(IN) Specifies the target thread ID.

ctx

(OUT) Points to the location where the thread's context is returned.

Return Values

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

Decimal

Hex

Constant

Description

9

0x09

NX_EINVAL

The target thread is invalid.

77

0x4D

NX_ESRCH

A parameter is invalid.