Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

include/tm.h File Reference

Interface: task management. More...

#include <mem.h>

Include dependency graph for tm.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Compounds

struct  _pchain_t
 priority chain data structure. More...

struct  _tdata_t
 task data structure. More...


Defines

#define PRIO_LOWEST   1
 The lowest possible task priority. More...

#define PRIO_NORMAL   10
 The priority of most tasks. More...

#define PRIO_HIGHEST   20
 The highest possible task priority. More...

#define T_DEAD   0
 dead and gone, stack freed. More...

#define T_ZOMBIE   1
 terminated, cleanup pending. More...

#define T_WAITING   2
 waiting for an event. More...

#define T_SLEEPING   3
 sleeping. wants to run. More...

#define T_RUNNING   4
 running. More...

#define T_KERNEL   (1 << 0)
 kernel task. More...

#define T_USER   (1 << 1)
 user task. More...

#define T_IDLE   (1 << 2)
 idle task. More...

#define T_SHUTDOWN   (1 << 7)
 shutdown requested. More...

#define DEFAULT_STACK_SIZE   512
 that's enough. More...

#define shutdown_requested()   (0)

Typedefs

typedef volatile unsigned char tstate_t
 task state type. More...

typedef volatile unsigned char tflags_t
 task flags type. More...

typedef unsigned char priority_t
 task priority type. More...

typedef unsigned long wakeup_t
 wakeup data area type. More...

typedef _pchain_t pchain_t
 priority chain data type a shorthand. More...

typedef _tdata_t tdata_t
 task data type. More...

typedef size_t tid_t
 task id type. More...


Detailed Description

Interface: task management.

Author:
Markus L. Noga <markus@noga.de>
Defines types and flags used in task management.

Definition in file tm.h.


Define Documentation

#define DEFAULT_STACK_SIZE   512
 

that's enough.

Definition at line 80 of file tm.h.

Referenced by kmain().

#define PRIO_HIGHEST   20
 

The highest possible task priority.

Definition at line 54 of file tm.h.

#define PRIO_LOWEST   1
 

The lowest possible task priority.

Definition at line 50 of file tm.h.

#define PRIO_NORMAL   10
 

The priority of most tasks.

Definition at line 52 of file tm.h.

Referenced by kmain().

 
#define shutdown_requested      (0)
 

Definition at line 136 of file tm.h.

#define T_DEAD   0
 

dead and gone, stack freed.

Todo:
the following comments on the defined may cause problems in when used in macros/expressions, etc. FixEm?

Definition at line 64 of file tm.h.

#define T_IDLE   (1 << 2)
 

idle task.

Definition at line 76 of file tm.h.

#define T_KERNEL   (1 << 0)
 

kernel task.

Definition at line 74 of file tm.h.

#define T_RUNNING   4
 

running.

Definition at line 68 of file tm.h.

#define T_SHUTDOWN   (1 << 7)
 

shutdown requested.

Definition at line 77 of file tm.h.

#define T_SLEEPING   3
 

sleeping. wants to run.

Definition at line 67 of file tm.h.

#define T_USER   (1 << 1)
 

user task.

Definition at line 75 of file tm.h.

#define T_WAITING   2
 

waiting for an event.

Definition at line 66 of file tm.h.

#define T_ZOMBIE   1
 

terminated, cleanup pending.

Definition at line 65 of file tm.h.


Typedef Documentation

typedef struct _pchain_t pchain_t
 

priority chain data type a shorthand.

Definition at line 99 of file tm.h.

typedef unsigned char priority_t
 

task priority type.

Definition at line 47 of file tm.h.

typedef struct _tdata_t tdata_t
 

task data type.

a shorthand

Definition at line 124 of file tm.h.

typedef volatile unsigned char tflags_t
 

task flags type.

Definition at line 45 of file tm.h.

typedef size_t tid_t
 

task id type.

In effect, the kernel simply typecasts *tdata_t to tid_t.

Definition at line 142 of file tm.h.

typedef volatile unsigned char tstate_t
 

task state type.

Definition at line 44 of file tm.h.

typedef unsigned long wakeup_t
 

wakeup data area type.

Definition at line 56 of file tm.h.

Referenced by enter_critical_section(), wait_critical_section(), and wait_event().


brickOS is released under the Mozilla Public License.
Original code copyright 1998-2002 by the authors.

Generated on Tue Dec 10 00:09:17 2002 for brickOS Kernel Developer by doxygen 1.2.15