Chris O'Byrne - YAVRTOS

The possible states that a task can be in


Defines

#define YAVRTOS_TASK_STATE_STARTING   1
 Starting.
#define YAVRTOS_TASK_STATE_RUNNING   2
 Running.
#define YAVRTOS_TASK_STATE_WAITING_TO_STOP   3
 Waiting for the task to release all of its mutexes before stopping.
#define YAVRTOS_TASK_STATE_STOPPING   4
 Stopping.
#define YAVRTOS_TASK_STATE_CLEANING_UP   5
 Cleaning up.
#define YAVRTOS_TASK_STATE_STOPPED   6
 Stopped.

Detailed Description

For internal use only.

These are the states that a task can be in (i.e. the possible values of task.status).


Define Documentation

#define YAVRTOS_TASK_STATE_CLEANING_UP   5

Cleaning up.

The task is stopping, and the stack contains the entire CPU context

This state is set by the scheduler the first time the task is scheduled after having had its state set to YAVRTOS_TASK_STATE_STOPPING

#define YAVRTOS_TASK_STATE_RUNNING   2

Running.

The task is running, and the stack contains the entire CPU context.

This state is set by the scheduler the first time the task is scheduled

#define YAVRTOS_TASK_STATE_STARTING   1

Starting.

The task is starting, and the stack only contains a return address for task_starter()

This state is set by create_task()

#define YAVRTOS_TASK_STATE_STOPPED   6

Stopped.

The task is completely dead, and this entry in the task list is available for new tasks.

This state is set by reserve_task(), and when the task has completely stopped.

#define YAVRTOS_TASK_STATE_STOPPING   4

Stopping.

The task is stopping, and the stack only contains a return address for task_stopper()

This state is set by stop_task() when there is no need, or desire, to wait for mutexes. Note that a task will commit suicide on lock_off() if it is in YAVRTOS_TASK_STATE_WAITING_TO_STOP and has just released its last mutex.

#define YAVRTOS_TASK_STATE_WAITING_TO_STOP   3

Waiting for the task to release all of its mutexes before stopping.

The task is running, and the stack contains the entire CPU context

This state is set by stop_task() when the wait_for_mutexes parameter is set and the task owns mutexes


YAVRTOS and YAVRTOS documentation Copyright © 2007-2009 Chris O'Byrne. Email - chris <at> obyrne <dot> com