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

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

Fix several bugs to use the vci_block_device with MMU activated

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[GIET_NB_TASKS_MAX][64];   // task contexts
13    unsigned int        tasks;                                        // actual number of tasks
14    unsigned int        current;                                      // current task index
15} static_scheduler_t;
16
17/////////////////////////////////////////////////////////////////////////////////
18//      Definition of the task context slots indexes
19/////////////////////////////////////////////////////////////////////////////////
20
21#define CTX_SR_ID               0
22#define CTX_SP_ID               29
23#define CTX_RA_ID               31
24
25#define CTX_EPC_ID              32
26#define CTX_CR_ID               33
27#define CTX_PTPR_ID             35
28#define CTX_MODE_ID             36
29
30#define CTX_TTY_ID              40
31#define CTX_FBDMA_ID    41
32#define CTX_PTAB_ID             42
33#define CTX_TASK_ID             43
34
35
36//////////////////////////////////////////////////////////////////////////////////
37//      Prototype of the context switch function
38//////////////////////////////////////////////////////////////////////////////////
39
40extern void _ctx_switch();
41
42extern static_scheduler_t _scheduler[];
43
44#endif
Note: See TracBrowser for help on using the repository browser.