Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1658 | giacomo | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: Giorgio Buttazzo <giorgio@sssup.it> |
||
5 | * Paolo Gai <pj@hartik.sssup.it> |
||
6 | * |
||
7 | * Authors : Marco caccamo and Paolo Gai |
||
8 | * |
||
9 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
10 | * |
||
11 | * http://www.sssup.it |
||
12 | * http://retis.sssup.it |
||
13 | * http://shark.sssup.it |
||
14 | */ |
||
15 | |||
16 | /** |
||
17 | ------------ |
||
18 | CVS : $Id: initfile.c,v 1.1 2004-06-01 11:42:42 giacomo Exp $ |
||
19 | |||
20 | File: $File$ |
||
21 | Revision: $Revision: 1.1 $ |
||
22 | Last update: $Date: 2004-06-01 11:42:42 $ |
||
23 | ------------ |
||
24 | |||
25 | This file contains the server CBS_FT |
||
26 | |||
27 | Read CBS_FT.h for further details. |
||
28 | |||
29 | **/ |
||
30 | |||
31 | /* |
||
32 | * Copyright (C) 2000 Marco Caccamo and Paolo Gai |
||
33 | * |
||
34 | * This program is free software; you can redistribute it and/or modify |
||
35 | * it under the terms of the GNU General Public License as published by |
||
36 | * the Free Software Foundation; either version 2 of the License, or |
||
37 | * (at your option) any later version. |
||
38 | * |
||
39 | * This program is distributed in the hope that it will be useful, |
||
40 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
41 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
42 | * GNU General Public License for more details. |
||
43 | * |
||
44 | * You should have received a copy of the GNU General Public License |
||
45 | * along with this program; if not, write to the Free Software |
||
46 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
47 | * |
||
48 | */ |
||
49 | |||
50 | #include "kernel/kern.h" |
||
51 | #include <modules/edf.h> |
||
52 | #include <modules/rr.h> |
||
53 | #include "cbs_ft.h" |
||
54 | #include <modules/cbs.h> |
||
55 | #include <modules/dummy.h> |
||
56 | #include <drivers/keyb.h> |
||
57 | #include <modules/hartport.h> |
||
58 | #include <modules/sem.h> |
||
59 | #include <modules/cabs.h> |
||
60 | |||
61 | /*+ system tick in us +*/ |
||
62 | #define TICK 300 |
||
63 | #define RRTICK 5000 |
||
64 | |||
65 | |||
66 | TIME __kernel_register_levels__(void *arg) |
||
67 | { |
||
68 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
69 | |||
70 | EDF_register_level(EDF_ENABLE_ALL); |
||
71 | CBS_FT_register_level(CBS_FT_ENABLE_ALL, 0); |
||
72 | RR_register_level(RRTICK, RR_MAIN_YES, mb); |
||
73 | CBS_register_level(CBS_ENABLE_ALL, 0); |
||
74 | dummy_register_level(); |
||
75 | |||
76 | SEM_register_module(); |
||
77 | CABS_register_module(); |
||
78 | |||
79 | // periodic timer |
||
80 | return TICK; |
||
81 | // one-shot timer |
||
82 | // return 0 |
||
83 | } |
||
84 | |||
85 | |||
86 | TASK __init__(void *arg) |
||
87 | { |
||
88 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
89 | |||
90 | HARTPORT_init(); |
||
91 | |||
92 | KEYB_init(NULL); |
||
93 | |||
94 | __call_main__(mb); |
||
95 | |||
96 | return (void *)0; |
||
97 | } |
||
98 | |||
99 | |||
100 | |||
101 | |||
102 | |||
103 | |||
104 | |||
105 | |||
106 | |||
107 | |||
108 | |||
109 | |||
110 | |||
111 | |||
112 |