Subversion Repositories shark

Rev

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

Rev Author Line No. Line
1085 pj 1
/*
2
* Filename: Initfile.c
3
* Author: Marco Ziglioli (Doctor Stein)
4
* Date: (I don't remeber... I'm sorry)
5
* Description: this file is the same for every examples in this section
6
*/
7
 
8
/* This file is part of the S.Ha.R.K. Project - http://shark.sssup.it
9
 *
10
 * Copyright (C) 2001 Marco Ziglioli
11
 *
12
 * This program is free software; you can redistribute it and/or modify
13
 * it under the terms of the GNU General Public License as published by
14
 * the Free Software Foundation; either version 2 of the License, or
15
 * (at your option) any later version.
16
 *
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 * GNU General Public License for more details.
21
 *
22
 * You should have received a copy of the GNU General Public License
23
 * along with this program; if not, write to the Free Software
24
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25
 *
26
 */
27
 
28
#include <kernel/kern.h>
29
#include <modules/edf.h>
30
#include <modules/cbs.h>
31
#include <modules/rr.h>
32
#include <modules/hartport.h>
33
#include <modules/dummy.h>
34
#include <modules/sem.h>
35
 
36
#include <drivers/keyb.h>
37
 
38
#define TICK 1000
39
#define RRTICK 5000
40
 
41
TIME __kernel_register_levels__(void *arg)
42
{
43
   struct multiboot_info *mb = (struct multiboot_info *)arg;
44
 
45
   EDF_register_level(EDF_ENABLE_ALL);
46
   CBS_register_level(CBS_ENABLE_ALL, 0);
47
   RR_register_level(RRTICK, RR_MAIN_YES, mb);
48
   dummy_register_level();
49
 
50
   return TICK;
51
}
52
 
53
TASK __init__(void *arg)
54
{
55
   struct multiboot_info *mb = (struct multiboot_info *)arg;
56
 
57
   HARTPORT_init();
58
   KEYB_init(NULL);
59
 
60
   __call_main__(mb);
61
 
62
   return (void *)0;
63
}