Subversion Repositories shark

Rev

Rev 1150 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1099 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
 ------------
1552 pj 21
 CVS :        $Id: iaster1.c,v 1.3 2005-02-25 11:10:46 pj Exp $
1099 pj 22
 
23
 File:        $File$
1552 pj 24
 Revision:    $Revision: 1.3 $
25
 Last update: $Date: 2005-02-25 11:10:46 $
1099 pj 26
 ------------
27
 
28
 System 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
 an EDF   (Earliest Deadline First) level
37
 a  RR    (Round Robin) level
38
 a  Dummy level
39
 
40
 It can accept these task models (into () the mandatory fields):
41
 
42
 HARD_TASK_MODEL (wcet+mit) at level 0
43
 NRT_TASK_MODEL  at level 1
44
 
45
**/
46
 
47
/*
48
 * Copyright (C) 2000 Paolo Gai
49
 *
50
 * This program is free software; you can redistribute it and/or modify
51
 * it under the terms of the GNU General Public License as published by
52
 * the Free Software Foundation; either version 2 of the License, or
53
 * (at your option) any later version.
54
 *
55
 * This program is distributed in the hope that it will be useful,
56
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
57
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
58
 * GNU General Public License for more details.
59
 *
60
 * You should have received a copy of the GNU General Public License
61
 * along with this program; if not, write to the Free Software
62
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
63
 *
64
 */
65
 
66
 
67
 
68
#include "kernel/kern.h"
1552 pj 69
#include "edf/edf/edf.h"
70
#include "rr/rr/rr.h"
71
#include "dummy/dummy/dummy.h"
1099 pj 72
 
73
 
74
/*+ sysyem tick in us +*/
1150 giacomo 75
#define TICK 1000
1099 pj 76
 
77
/*+ RR tick in us +*/
78
#define RRTICK 10000
79
 
80
TIME __kernel_register_levels__(void *arg)
81
{
82
  struct multiboot_info *mb = (struct multiboot_info *)arg;
83
 
84
  EDF_register_level(EDF_ENABLE_ALL);
85
  RR_register_level(RRTICK, RR_MAIN_YES, mb);
86
  dummy_register_level();
87
 
88
  return TICK;
89
}
90
 
91
TASK __init__(void *arg)
92
{
93
  struct multiboot_info *mb = (struct multiboot_info *)arg;
94
 
95
  __call_main__(mb);
96
 
97
  return (void *)0;
98
}
99