Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1131 | pj | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Paolo Gai <pj@gandalf.sssup.it> |
||
10 | * (see the web pages for full authors list) |
||
11 | * |
||
12 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
13 | * |
||
14 | * http://www.sssup.it |
||
15 | * http://retis.sssup.it |
||
16 | * http://shark.sssup.it |
||
17 | */ |
||
18 | |||
19 | /** |
||
20 | ------------ |
||
21 | CVS : $Id: ihello.c,v 1.1 2003-03-17 09:29:39 pj Exp $ |
||
22 | |||
23 | File: $File$ |
||
24 | Revision: $Revision: 1.1 $ |
||
25 | Last update: $Date: 2003-03-17 09:29:39 $ |
||
26 | ------------ |
||
27 | |||
28 | The simplest initialization file |
||
29 | |||
30 | The tick is set to TICK ms. |
||
31 | |||
32 | This file contains the 2 functions needed to initialize the system. |
||
33 | |||
34 | These functions register the following levels: |
||
35 | |||
36 | a RR (Round Robin) level |
||
37 | a Dummy level |
||
38 | |||
39 | It can accept these task models: |
||
40 | |||
41 | NRT_TASK_MODEL at level 0 |
||
42 | |||
43 | **/ |
||
44 | |||
45 | /* |
||
46 | * Copyright (C) 2000 Paolo Gai |
||
47 | * |
||
48 | * This program is free software; you can redistribute it and/or modify |
||
49 | * it under the terms of the GNU General Public License as published by |
||
50 | * the Free Software Foundation; either version 2 of the License, or |
||
51 | * (at your option) any later version. |
||
52 | * |
||
53 | * This program is distributed in the hope that it will be useful, |
||
54 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
55 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
56 | * GNU General Public License for more details. |
||
57 | * |
||
58 | * You should have received a copy of the GNU General Public License |
||
59 | * along with this program; if not, write to the Free Software |
||
60 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
61 | * |
||
62 | */ |
||
63 | |||
64 | |||
65 | |||
66 | #include "kernel/kern.h" |
||
67 | #include "modules/rr.h" |
||
68 | #include "modules/dummy.h" |
||
69 | |||
70 | |||
71 | /*+ sysyem tick in us +*/ |
||
72 | #define TICK 300 |
||
73 | |||
74 | /*+ RR tick in us +*/ |
||
75 | #define RRTICK 10000 |
||
76 | |||
77 | TIME __kernel_register_levels__(void *arg) |
||
78 | { |
||
79 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
80 | |||
81 | RR_register_level(RRTICK, RR_MAIN_YES, mb); |
||
82 | dummy_register_level(); |
||
83 | |||
84 | return TICK; |
||
85 | } |
||
86 | |||
87 | TASK __init__(void *arg) |
||
88 | { |
||
89 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
90 | |||
91 | __call_main__(mb); |
||
92 | |||
93 | return (void *)0; |
||
94 | } |
||
95 |