Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 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
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
11
 *   Luca Abeni          <luca@gandalf.sssup.it>
12
 *   (see the web pages for full authors list)
13
 *
14
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
15
 *
16
 * http://www.sssup.it
17
 * http://retis.sssup.it
18
 * http://shark.sssup.it
19
 */
20
 
21
 
22
/**
23
 ------------
24
 CVS :        $Id: var.h,v 1.1.1.1 2002-03-29 14:12:51 pj Exp $
25
 
26
 File:        $File$
27
 Revision:    $Revision: 1.1.1.1 $
28
 Last update: $Date: 2002-03-29 14:12:51 $
29
 ------------
30
 
31
Kernel global variables
32
 
33
**/
34
 
35
/*
36
 * Copyright (C) 2000 Paolo Gai
37
 *
38
 * This program is free software; you can redistribute it and/or modify
39
 * it under the terms of the GNU General Public License as published by
40
 * the Free Software Foundation; either version 2 of the License, or
41
 * (at your option) any later version.
42
 *
43
 * This program is distributed in the hope that it will be useful,
44
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
45
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
46
 * GNU General Public License for more details.
47
 *
48
 * You should have received a copy of the GNU General Public License
49
 * along with this program; if not, write to the Free Software
50
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
51
 *
52
 */
53
 
54
#ifndef __KERNEL_VAR_H__
55
#define __KERNEL_VAR_H__
56
 
57
#include <ll/ll.h>
58
#include <sys/types.h>
59
#include <kernel/descr.h>
60
 
61
/*---------------------------------------------------------------------*/
62
/* Kernel global variables: system queues & clock counters ...         */
63
/*---------------------------------------------------------------------*/
64
 
65
extern proc_des      proc_table[];     /*+ Process descriptor table   +*/
66
extern level_des    *level_table[];    /*+ Level descriptor table     +*/
67
extern resource_des *resource_table[]; /*+ Resource descriptor table  +*/
68
 
69
 
70
extern PID exec;              /*+ task suggested by the scheduler     +*/
71
extern PID exec_shadow;       /*+ task really executed                +*/
72
 
73
extern QUEUE freedesc;        /*+ Free descriptor handled as a queue  +*/
74
 
75
extern TIME  sys_tick;        /*+ System tick (in usec)               +*/
76
extern struct timespec schedule_time;
77
                              /*+ Time at witch the last scheduler()
78
                                  was called                          +*/
79
 
80
extern int   cap_timer;       /*+ the capacity event posted when the
81
                                  task starts                         +*/
82
extern struct timespec cap_lasttime;
83
                              /*+ the time at whitch the capacity
84
                                  event is posted. Normally, it is
85
                                  equal to schedule_time              +*/
86
 
87
extern DWORD sched_levels;    /*+ Schedule levels active in the system +*/
88
extern DWORD res_levels;      /*+ Resource levels active in the system +*/
89
 
90
extern int task_counter;      /*+ Application task counter. It represent
91
                                  the number of Application tasks in the
92
                                  system. When all Application Tasks end,
93
                                  also the system ends.                +*/
94
 
95
extern int system_counter;    /*+ System task counter. It represent
96
                                  the number of System tasks in the
97
                                  system with the NO_KILL flag reset.
98
                                  When all Application Tasks end,
99
                                  the system waits for the end of the
100
                                  system tasks and then it ends.       +*/
101
 
102
 
103
extern int mustexit;          /*+ This variable is set by the system
104
                                  call sys_end() or sys_abort().
105
                                  When a sys_end() or sys_abort is called
106
                                  into an event handler,
107
                                  we don't have to change context in the
108
                                  reschedule(). +*/
109
 
110
int calling_runlevel_func;    /*+ this variable is set to 1 into
111
                                  call_runlevel_func (look at init.c)
112
                                  ad it is used because the task_activate
113
                                  (look at activate.c) must work in a
114
                                  different way when the system is in the
115
                                  global_context +*/
116
 
117
#endif /* __VAR_H__ */