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

include/sys/tm.h File Reference

Internal Interface: task management. More...

#include <config.h>
#include "../tm.h"

Include dependency graph for tm.h:

Include dependency graph

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

Included by dependency graph

Go to the source code of this file.

Defines

#define SP_RETURN_OFFSET   10
 return address offset on stack in words.

#define IDLE_STACK_SIZE   128
 should suffice for IRQ service


Functions

void tm_init (void)
 init task management

void tm_start (void)
 start task management

void tm_switcher (void)
 the task switcher IRQ handler

size_ttm_scheduler (size_t *old_sp)
 the process scheduler

int tm_idle_task (int, char **)
 the idle task


Variables

tdata_t td_single
 single process process data

tdata_tctid
 ptr to current process data

volatile unsigned int nb_tasks
 number of tasks

volatile unsigned int nb_system_tasks
volatile unsigned char tm_timeslice
 task time slice


Detailed Description

Internal Interface: task management.

Author:
Markus L. Noga <markus@noga.de>

Definition in file tm.h.


Define Documentation

#define IDLE_STACK_SIZE   128
 

should suffice for IRQ service

Definition at line 48 of file tm.h.

#define SP_RETURN_OFFSET   10
 

return address offset on stack in words.

Definition at line 46 of file tm.h.


Function Documentation

int tm_idle_task int  ,
char ** 
 

the idle task

infinite sleep instruction to conserve power

void tm_init void   ) 
 

init task management

size_t* tm_scheduler size_t old_sp  ) 
 

the process scheduler

Parameters:
old_sp current task's current stack pointer
Returns:
new task's current stack pointer
actual context switches performed by tm_switcher (assembler wrapper)

void tm_start void   ) 
 

start task management

called in single tasking mode after task setup

void tm_switcher void   ) 
 

the task switcher IRQ handler

located in the assembler process module


Variable Documentation

tdata_t* ctid
 

ptr to current process data

Definition at line 58 of file tm.h.

volatile unsigned int nb_system_tasks
 

Definition at line 64 of file tm.h.

volatile unsigned int nb_tasks
 

number of tasks

Definition at line 60 of file tm.h.

tdata_t td_single
 

single process process data

Definition at line 56 of file tm.h.

volatile unsigned char tm_timeslice
 

task time slice

Definition at line 67 of file tm.h.

Referenced by systime_init(), and systime_set_timeslice().


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

Generated on Mon Feb 16 21:02:25 2004 for brickOS Kernel Developer by doxygen 1.3.5