source: soft/giet_vm/sys/ctx_handler.h @ 189

Last change on this file since 189 was 189, checked in by alain, 12 years ago

Introducing a new release where all initialisation
is done in the boot code.

File size: 1.3 KB
Line 
1#ifndef _CTX_HANDLER_H
2#define _CTX_HANDLER_H
3
4#include <giet_config.h>
5
6/////////////////////////////////////////////////////////////////////////////////
7//      Definition of the scheduler structure
8/////////////////////////////////////////////////////////////////////////////////
9
10typedef struct static_scheduler_s
11{
12    unsigned int        context[15][64];                // at most 15 task contexts
13    unsigned int        tasks;                                  // actual number of tasks
14    unsigned int        current;                                // current task index
15    unsigned int        interrupt_vector[32];   // interrupt vector
16} static_scheduler_t;
17
18/////////////////////////////////////////////////////////////////////////////////
19//      Definition of the task context slots indexes
20/////////////////////////////////////////////////////////////////////////////////
21
22#define CTX_SR_ID               0
23#define CTX_SP_ID               29
24#define CTX_RA_ID               31
25
26#define CTX_EPC_ID              32
27#define CTX_CR_ID               33
28#define CTX_PTPR_ID             35
29#define CTX_MODE_ID             36
30
31#define CTX_TTY_ID              40
32#define CTX_FBDMA_ID    41
33#define CTX_PTAB_ID             42
34#define CTX_TASK_ID             43
35#define CTX_SCHED_ID    44
36#define CTX_TIMER_ID    45
37
38//////////////////////////////////////////////////////////////////////////////////
39//      Prototype of the context switch function
40//////////////////////////////////////////////////////////////////////////////////
41
42extern void _ctx_switch();
43
44extern static_scheduler_t _scheduler[];
45
46#endif
Note: See TracBrowser for help on using the repository browser.