NXContextSetName

Sets the name of the specified context.

Library:LibC
Classification:NKS
Service:Threads

Syntax

  #include <nks/nksapi.h> 
   
  int NXContextSetName (
     NXContext_t   ctx,
     const char   *name); 
  

Parameters

cxt

(IN) Points to the context handle returned from NXContextAlloc.

name

(IN) Points to the name to be assigned to the context (with a maximum of NX_MAX_OBJECT_NAME_LEN—not including NULL termination).

Return Values

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

Decimal

Hex

Constant

Description

62

0x3E

NX_EBUSY

The specified context is currently in use (bound to a thread)

Remarks

The specified context must be idle because it is illegal to call NXContextSetName on a context that is currently being hosted by a thread.

Names have no significance to NKS. However, if an executing context has significance to your application, associating a name with a context be useful during debugging.

On NetWare, threads that execute the named context will use the name in the debugger.