Subversion Repositories shark

Rev

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

Rev Author Line No. Line
1346 giacomo 1
/*
1356 giacomo 2
 * Project: S.Ha.R.K
1346 giacomo 3
 *
1356 giacomo 4
 * Coordinators: Giorgio Buttazzo <giorgio@sssup.it>
1346 giacomo 5
 *
6
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
7
 *
8
 * http://www.sssup.it
9
 * http://retis.sssup.it
1356 giacomo 10
 * http://hartik.sssup.it
1346 giacomo 11
 */
12
 
13
#include "kernel/kern.h"
14
#include "modules/edf.h"
15
#include "modules/hardcbs.h"
16
#include "modules/rr.h"
17
#include "modules/dummy.h"
18
#include "modules/intdrive.h"
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 +*/
1356 giacomo 30
#define INTDRIVE_Q 1000
31
#define INTDRIVE_T 10000
32
#define INTDRIVE_FLAG 0
33
 
34
TIME __kernel_register_levels__(void *arg)
35
{
36
        struct multiboot_info *mb = (struct multiboot_info *)arg;
1346 giacomo 37
 
1356 giacomo 38
        INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG);
39
        EDF_register_level(EDF_ENABLE_ALL);
40
        HCBS_register_level(HCBS_ENABLE_ALL, 1);
41
        RR_register_level(RRTICK, RR_MAIN_YES, mb);
42
        dummy_register_level();
1346 giacomo 43
 
1356 giacomo 44
        SEM_register_module();
45
 
46
        return TICK;
1346 giacomo 47
}
48
 
49
TASK __init__(void *arg)
50
{
1356 giacomo 51
        struct multiboot_info *mb = (struct multiboot_info *)arg;
1346 giacomo 52
 
1356 giacomo 53
        HARTPORT_init();
54
 
55
        __call_main__(mb);
56
 
57
        return (void *)0;
1346 giacomo 58
}