NXContextInfo_t

Contains information about a context.

Service:Threads

Structure

  #include <nks/thread.h>
  
  typedef struct
  {
     NXContextState_t   ciState;
     void              (*ciFunc) (void *);
     void               *ciArg;
     int                ciPriority;
     size_t             ciStackSize;
     unsigned long      ciFlags;
  } NXContextInfo_t;
  

Fields

ciState

Specifies the state of the context with one of the following flag:

Flag

Value

Description

NX_CTXSTATE_INIT

0xFFFFFFFF

The context is unbound and is initialized to the values it had when it was allocated.

NX_CTXSTATE_BOUND

0x00000001

The context is currently bound to a thread.

NX_CTXSTATE_UNBOUND

0x00000000

The context is unbound but its values have not been reset to its initialization values.

ciFunc

Points to the start function for the context.

ciArg

Points to the argument to pass to the start function.

ciPriority

Specifies the priority of the context with one of the following flags:

Flag

Value

Description

NX_PRIO_HIGH

10

High priority

NX_PRIO_MED

5

Medium priority

NX_PRIO_LOW

1

Low priority

NOTE:Because the NetWare® scheduler does not currently support priority, this flag has no effect on NetWare.

ciStackSize

Specifies the size of the context stack.

ciFlags

Specifies the context type with one of the following flags:

Constant

Value

Description

NX_CTX_NORMAL

0

Normal context-can be bound to an application thread. Only contexts of this type may be passed to NXThreadCreate.

NX_CTX_WORK

1

Work context-can be bound only to an anonymous thread. Only contexts of this type may be passed to NXWorkSchedule and NXDelayedWorkSchedule

Remarks

The NX_CTXSTATE_INIT state is the only state in which the ciFunc and ciArg fields contain valid information.