Subversion Repositories shark

Rev

Rev 1552 | 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
 ------------
1552 pj 21
 CVS :        $Id: initfile.c,v 1.2 2005-02-25 11:10:46 pj Exp $
1085 pj 22
 
23
 File:        $File$
1552 pj 24
 Revision:    $Revision: 1.2 $
25
 Last update: $Date: 2005-02-25 11:10:46 $
1085 pj 26
 ------------
27
**/
28
 
29
/*
30
 * Copyright (C) 2000 Paolo Gai and Gabriele Bolognini
31
 *
32
 * This program is free software; you can redistribute it and/or modify
33
 * it under the terms of the GNU General Public License as published by
34
 * the Free Software Foundation; either version 2 of the License, or
35
 * (at your option) any later version.
36
 *
37
 * This program is distributed in the hope that it will be useful,
38
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
39
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
40
 * GNU General Public License for more details.
41
 *
42
 * You should have received a copy of the GNU General Public License
43
 * along with this program; if not, write to the Free Software
44
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
45
 *
46
 */
47
 
48
#include "kernel/kern.h"
1552 pj 49
#include "rr/rr/rr.h"
50
#include "dummy/dummy/dummy.h"
1085 pj 51
 
52
/*+ sysyem tick in us +*/
53
#define TICK 0
54
 
55
/*+ RR tick in us +*/
56
#define RRTICK 10000
57
 
58
void read_myfile(void);
59
 
60
TIME __kernel_register_levels__(void *arg)
61
{
62
  struct multiboot_info *mb = (struct multiboot_info *)arg;
63
 
64
  RR_register_level(RRTICK, RR_MAIN_YES, mb);
65
  dummy_register_level();
66
 
67
  /* If you need to interact with the DOS Filesystem and you use
68
     the X eXtender, this is the better place where you can use
69
     the DOS_fXXX functions...
70
 
71
     WARNING: You can call these functions only when you are in
72
              real mode!!!
73
 
74
     The system is in real mode:
75
     - into __kernel_register_levels__()
76
     - into sys_atrunlevel functions posted with RUNLEVEL_AFTER_EXIT
77
  */
78
  read_myfile();
79
 
80
  return TICK;
81
}
82
 
83
TASK __init__(void *arg)
84
{
85
  struct multiboot_info *mb = (struct multiboot_info *)arg;
86
 
87
  __call_main__(mb);
88
 
89
  return (void *)0;
90
}
91