Subversion Repositories shark

Rev

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

Rev Author Line No. Line
1085 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: initfile.c,v 1.1.1.1 2002-09-02 09:37:45 pj Exp $
22
 
23
 File:        $File$
24
 Revision:    $Revision: 1.1.1.1 $
25
 Last update: $Date: 2002-09-02 09:37:45 $
26
 ------------
27
 
28
 This file is similar to the configuration of Hartik 3.3.1
29
 
30
**/
31
 
32
/*
33
 * Copyright (C) 2000 Paolo Gai
34
 *
35
 * This program is free software; you can redistribute it and/or modify
36
 * it under the terms of the GNU General Public License as published by
37
 * the Free Software Foundation; either version 2 of the License, or
38
 * (at your option) any later version.
39
 *
40
 * This program is distributed in the hope that it will be useful,
41
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
42
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43
 * GNU General Public License for more details.
44
 *
45
 * You should have received a copy of the GNU General Public License
46
 * along with this program; if not, write to the Free Software
47
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
48
 *
49
 */
50
 
51
 
52
 
53
#include "kernel/kern.h"
54
#include "modules/edf.h"
55
#include "modules/cbs.h"
56
#include "modules/rr.h"
57
#include "modules/dummy.h"
58
 
59
#include "modules/sem.h"
60
#include "modules/hartport.h"
61
#include "modules/cabs.h"
62
 
63
#include "drivers/keyb.h"
64
 
65
 
66
/*+ sysyem tick in us +*/
67
#define TICK 1000
68
 
69
/*+ RR tick in us +*/
70
#define RRTICK 10000
71
 
72
TIME __kernel_register_levels__(void *arg)
73
{
74
  struct multiboot_info *mb = (struct multiboot_info *)arg;
75
 
76
  EDF_register_level(0);
77
  RR_register_level(RRTICK, RR_MAIN_YES, mb);
78
  CBS_register_level(CBS_ENABLE_ALL, 0);
79
  dummy_register_level();
80
 
81
  SEM_register_module();
82
 
83
  CABS_register_module();
84
 
85
  return TICK;
86
}
87
 
88
TASK __init__(void *arg)
89
{
90
  struct multiboot_info *mb = (struct multiboot_info *)arg;
91
 
92
  HARTPORT_init();
93
 
94
  KEYB_init(NULL);
95
 
96
  __call_main__(mb);
97
 
98
  return (void *)0;
99
}
100