source: trunk/minix/kernel/glo.h@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.6 KB
Line 
1#ifndef GLO_H
2#define GLO_H
3
4/* Global variables used in the kernel. This file contains the declarations;
5 * storage space for the variables is allocated in table.c, because EXTERN is
6 * defined as extern unless the _TABLE definition is seen. We rely on the
7 * compiler's default initialization (0) for several global variables.
8 */
9#ifdef _TABLE
10#undef EXTERN
11#define EXTERN
12#endif
13
14#include <minix/config.h>
15#include "config.h"
16
17/* Variables relating to shutting down MINIX. */
18EXTERN char kernel_exception; /* TRUE after system exceptions */
19EXTERN char shutdown_started; /* TRUE after shutdowns / reboots */
20
21/* Kernel information structures. This groups vital kernel information. */
22EXTERN phys_bytes aout; /* address of a.out headers */
23EXTERN struct kinfo kinfo; /* kernel information for users */
24EXTERN struct machine machine; /* machine information for users */
25EXTERN struct kmessages kmess; /* diagnostic messages in kernel */
26EXTERN struct randomness krandom; /* gather kernel random information */
27EXTERN struct loadinfo kloadinfo; /* status of load average */
28
29/* Process scheduling information and the kernel reentry count. */
30EXTERN struct proc *prev_ptr; /* previously running process */
31EXTERN struct proc *proc_ptr; /* pointer to currently running process */
32EXTERN struct proc *next_ptr; /* next process to run after restart() */
33EXTERN struct proc *bill_ptr; /* process to bill for clock ticks */
34EXTERN char k_reenter; /* kernel reentry count (entry count less 1) */
35EXTERN unsigned lost_ticks; /* clock ticks counted outside clock task */
36
37#if (CHIP == INTEL)
38
39/* Interrupt related variables. */
40EXTERN irq_hook_t irq_hooks[NR_IRQ_HOOKS]; /* hooks for general use */
41EXTERN irq_hook_t *irq_handlers[NR_IRQ_VECTORS];/* list of IRQ handlers */
42EXTERN int irq_actids[NR_IRQ_VECTORS]; /* IRQ ID bits active */
43EXTERN int irq_use; /* map of all in-use irq's */
44
45/* Miscellaneous. */
46EXTERN reg_t mon_ss, mon_sp; /* boot monitor stack */
47EXTERN int mon_return; /* true if we can return to monitor */
48EXTERN int do_serial_debug;
49EXTERN int who_e, who_p; /* message source endpoint and proc */
50
51/* VM */
52EXTERN phys_bytes vm_base;
53EXTERN phys_bytes vm_size;
54EXTERN phys_bytes vm_mem_high;
55
56/* Variables that are initialized elsewhere are just extern here. */
57extern struct boot_image image[]; /* system image processes */
58extern char *t_stack[]; /* task stack space */
59extern struct segdesc_s gdt[]; /* global descriptor table */
60
61EXTERN _PROTOTYPE( void (*level0_func), (void) );
62#endif /* (CHIP == INTEL) */
63
64#if (CHIP == M68000)
65/* M68000 specific variables go here. */
66#endif
67
68#endif /* GLO_H */
Note: See TracBrowser for help on using the repository browser.