Synopsis
typedef struct {
  unsigned *stack_pointer;
  unsigned char priority;
  unsigned char state;
  unsigned char timeout_occured;
  CTL_TIME_t timeout;
  void *wait_object;
  CTL_EVENT_SET_t wait_events;
  int thread_errno;
  void *data;
  CTL_TIME_t execution_time;
  unsigned *stack_start;
  const char *name;
} CTL_TASK_t;
Description

CTL_TASK_t defines the task structure. The task structure contains:

Member Description
stack_pointer the saved register state of the task when it is not scheduled
priority the priority of the task
state the state of task CTL_STATE_RUNNABLE or (CTL_STATE_*_WAIT_* | CTL_STATE_TIMER_WAIT) or CTL_STATE_SUSPENDED
timeout_occured 1 if a wait timed out otherwise 0 - when state is CTL_RUNNABLE
next next pointer for wait queue
timeout wait timeout value or time slice value when the task is executing
wait_object the event set, semaphore, message queue or mutex to wait on
wait_events the events to wait for
thread_errno thread specific errno
data task specific data pointer
execution_time number of ticks the task has executed for
stack_start the start (lowest address) of the stack
name task name