Subversion Repositories shark

Rev

Rev 1086 | Rev 1382 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1085 pj 1
/*
1377 giacomo 2
 * Project: S.Ha.R.K
1085 pj 3
 *
1377 giacomo 4
 * Coordinators: Giorgio Buttazzo <giorgio@sssup.it>
1085 pj 5
 *
6
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
7
 *
8
 * http://www.sssup.it
9
 * http://retis.sssup.it
1377 giacomo 10
 * http://hartik.sssup.it
1085 pj 11
 */
12
 
13
#include "kernel/kern.h"
14
#include "modules/edf.h"
15
#include "modules/cbs.h"
16
#include "modules/rr.h"
17
#include "modules/dummy.h"
1377 giacomo 18
#include "modules/intdrive.h"
1085 pj 19
 
20
#include "modules/sem.h"
21
#include "modules/hartport.h"
22
 
23
/*+ sysyem tick in us +*/
24
#define TICK 0
25
 
26
/*+ RR tick in us +*/
27
#define RRTICK 10000
28
 
1377 giacomo 29
/*+ Interrupt Server +*/
30
#define INTDRIVE_Q 1000
31
#define INTDRIVE_T 10000
32
#define INTDRIVE_FLAG 0
33
 
1085 pj 34
TIME __kernel_register_levels__(void *arg)
35
{
1377 giacomo 36
        struct multiboot_info *mb = (struct multiboot_info *)arg;
1085 pj 37
 
1377 giacomo 38
        INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG);
39
        EDF_register_level(EDF_ENABLE_ALL);
40
        CBS_register_level(CBS_ENABLE_ALL, 1);
41
        RR_register_level(RRTICK, RR_MAIN_YES, mb);
42
        dummy_register_level();
1085 pj 43
 
1377 giacomo 44
        SEM_register_module();
1085 pj 45
 
1377 giacomo 46
        return TICK;
1085 pj 47
}
48
 
49
TASK __init__(void *arg)
50
{
1377 giacomo 51
        struct multiboot_info *mb = (struct multiboot_info *)arg;
1085 pj 52
 
1377 giacomo 53
        HARTPORT_init();
1085 pj 54
 
1377 giacomo 55
        __call_main__(mb);
1085 pj 56
 
1377 giacomo 57
        return (void *)0;
1085 pj 58
}