2005-07-14 17:12:12 +02:00
|
|
|
#ifndef GLO_H
|
|
|
|
#define GLO_H
|
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
/* Global variables used in the kernel. This file contains the declarations;
|
|
|
|
* storage space for the variables is allocated in table.c, because EXTERN is
|
2005-06-03 15:55:06 +02:00
|
|
|
* defined as extern unless the _TABLE definition is seen. We rely on the
|
2005-07-14 17:12:12 +02:00
|
|
|
* compiler's default initialization (0) for several global variables.
|
2005-04-21 16:53:53 +02:00
|
|
|
*/
|
|
|
|
#ifdef _TABLE
|
|
|
|
#undef EXTERN
|
|
|
|
#define EXTERN
|
|
|
|
#endif
|
|
|
|
|
2005-06-01 11:37:52 +02:00
|
|
|
#include <minix/config.h>
|
2005-07-14 17:12:12 +02:00
|
|
|
#include "config.h"
|
2005-06-01 11:37:52 +02:00
|
|
|
|
2005-06-03 15:55:06 +02:00
|
|
|
/* Variables relating to shutting down MINIX. */
|
|
|
|
EXTERN char kernel_exception; /* TRUE after system exceptions */
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-04-29 17:36:43 +02:00
|
|
|
/* Kernel information structures. This groups vital kernel information. */
|
2005-06-03 15:55:06 +02:00
|
|
|
EXTERN phys_bytes aout; /* address of a.out headers */
|
|
|
|
EXTERN struct kinfo kinfo; /* kernel information for users */
|
|
|
|
EXTERN struct machine machine; /* machine information for users */
|
|
|
|
EXTERN struct kmessages kmess; /* diagnostic messages in kernel */
|
|
|
|
EXTERN struct randomness krandom; /* gather kernel random information */
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2005-06-03 15:55:06 +02:00
|
|
|
/* Process scheduling information and the kernel reentry count. */
|
2005-06-30 17:55:19 +02:00
|
|
|
EXTERN struct proc *prev_ptr; /* previously running process */
|
2005-04-21 16:53:53 +02:00
|
|
|
EXTERN struct proc *proc_ptr; /* pointer to currently running process */
|
2005-06-24 18:24:40 +02:00
|
|
|
EXTERN struct proc *next_ptr; /* next process to run after restart() */
|
|
|
|
EXTERN struct proc *bill_ptr; /* process to bill for clock ticks */
|
2005-05-24 12:06:17 +02:00
|
|
|
EXTERN char k_reenter; /* kernel reentry count (entry count less 1) */
|
|
|
|
EXTERN unsigned lost_ticks; /* clock ticks counted outside clock task */
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
#if (CHIP == INTEL)
|
|
|
|
|
|
|
|
/* Interrupt related variables. */
|
2005-05-02 16:30:04 +02:00
|
|
|
EXTERN irq_hook_t irq_hooks[NR_IRQ_HOOKS]; /* hooks for general use */
|
|
|
|
EXTERN irq_hook_t *irq_handlers[NR_IRQ_VECTORS];/* list of IRQ handlers */
|
2005-04-21 16:53:53 +02:00
|
|
|
EXTERN int irq_actids[NR_IRQ_VECTORS]; /* IRQ ID bits active */
|
2005-06-03 15:55:06 +02:00
|
|
|
EXTERN int irq_use; /* map of all in-use irq's */
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/* Miscellaneous. */
|
2005-06-03 15:55:06 +02:00
|
|
|
EXTERN reg_t mon_ss, mon_sp; /* boot monitor stack */
|
|
|
|
EXTERN int mon_return; /* true if we can return to monitor */
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/* Variables that are initialized elsewhere are just extern here. */
|
2005-07-29 17:26:23 +02:00
|
|
|
extern struct boot_image image[]; /* system image processes */
|
2005-06-03 15:55:06 +02:00
|
|
|
extern char *t_stack[]; /* task stack space */
|
|
|
|
extern struct segdesc_s gdt[]; /* global descriptor table */
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
EXTERN _PROTOTYPE( void (*level0_func), (void) );
|
|
|
|
#endif /* (CHIP == INTEL) */
|
|
|
|
|
|
|
|
#if (CHIP == M68000)
|
|
|
|
/* M68000 specific variables go here. */
|
|
|
|
#endif
|
|
|
|
|
2005-07-14 17:12:12 +02:00
|
|
|
#endif /* GLO_H */
|