NXTimeOut_t

Contains information about timeout operations.

Service:Timeout

Structure

  #include <nks/time.h>
  
  typedef struct 
  {
     unsigned long   reserved1 [4]
     void           (toRoutine)(void  *); 
     void          *toArg;
     NXTimerVal_t   toTimerVal;
     unsigned long  reserved2 [16];
  } NXTimeOut_t;
  

Fields

reserved1

Reserved. Initialize to zero.

toRoutine

Points to the function to be executed. The function returns void and takes a void * as its sole parameter.

toArg

Specifies the parameter to be passed to the function pointed to by toRoutine.

toTimerVal

Specifies an initialized NXTimerVal_t structure, which specifies the time at which the function will be executed. On expiration of the timer, the specified function will be executed.

reserved2

Is reserved for future use.

Remarks

You cannot assume anything about the thread/context that executes the function. The function cannot sleep nor reference thread-specific key-data pairs. The following NKS functions can be invoked from within the timeout function:

  • NXTimeOutSchedule
  • NXWorkSchedule
  • NXLwWorkSchedule
  • NXDelayedWorkSchedule
  • NXLwWorkCancel
  • NXThreadInterrupt
  • NXGetPageSize
  • NXGetCacheLineSize
  • NXMemFree
  • NXPageFree
  • NXTryLock
  • NXTryRdLock
  • NXTryWrLock
  • NXUnlock
  • NXCondBroadcast
  • NXCondSignal
  • NXSemaPost
  • NXSemaTryWait
  • NXGetTime
  • NXGetSystemTick