Only main() now gives a warning about the return type (GCC wants an int).
/* Despite its name, this routine is not called on every clock tick. It
* is called on those clock ticks when a lot of work needs to be done.
*/
- register struct proc *rp;
- register int proc_nr;
- timer_t *tp;
- struct proc *p;
/* Check if a clock timer expired and run its watchdog function. */
if (next_timeout <= realtime) {
* faster on a 5MHz 8088, and make task debugging much easier since there are
* no task switches on an inactive system.
*/
- register struct proc *rp;
register unsigned ticks;
message m;
#if ! NEW_TIME_COUNT
int minprocessor;
};
static struct ex_s ex_data[] = {
- "Divide error", SIGFPE, 86,
- "Debug exception", SIGTRAP, 86,
- "Nonmaskable interrupt", SIGBUS, 86,
- "Breakpoint", SIGEMT, 86,
- "Overflow", SIGFPE, 86,
- "Bounds check", SIGFPE, 186,
- "Invalid opcode", SIGILL, 186,
- "Coprocessor not available", SIGFPE, 186,
- "Double fault", SIGBUS, 286,
- "Copressor segment overrun", SIGSEGV, 286,
- "Invalid TSS", SIGSEGV, 286,
- "Segment not present", SIGSEGV, 286,
- "Stack exception", SIGSEGV, 286, /* STACK_FAULT already used */
- "General protection", SIGSEGV, 286,
- "Page fault", SIGSEGV, 386, /* not close */
- NIL_PTR, SIGILL, 0, /* probably software trap */
- "Coprocessor error", SIGFPE, 386,
+ { "Divide error", SIGFPE, 86 },
+ { "Debug exception", SIGTRAP, 86 },
+ { "Nonmaskable interrupt", SIGBUS, 86 },
+ { "Breakpoint", SIGEMT, 86 },
+ { "Overflow", SIGFPE, 86 },
+ { "Bounds check", SIGFPE, 186 },
+ { "Invalid opcode", SIGILL, 186 },
+ { "Coprocessor not available", SIGFPE, 186 },
+ { "Double fault", SIGBUS, 286 },
+ { "Copressor segment overrun", SIGSEGV, 286 },
+ { "Invalid TSS", SIGSEGV, 286 },
+ { "Segment not present", SIGSEGV, 286 },
+ { "Stack exception", SIGSEGV, 286 }, /* STACK_FAULT already used */
+ { "General protection", SIGSEGV, 286 },
+ { "Page fault", SIGSEGV, 386 }, /* not close */
+ { NIL_PTR, SIGILL, 0 }, /* probably software trap */
+ { "Coprocessor error", SIGFPE, 386 },
};
register struct ex_s *ep;
struct proc *saved_proc;
{
/* Add 'rp' to one of the queues of runnable processes. */
register int q = rp->p_priority; /* scheduling queue to use */
- register struct proc **xpp; /* iterate over queue */
#if ENABLE_K_DEBUGGING
if(rp->p_ready) {
unsigned char privilege;
}
gate_table[] = {
- divide_error, DIVIDE_VECTOR, INTR_PRIVILEGE,
- single_step_exception, DEBUG_VECTOR, INTR_PRIVILEGE,
- nmi, NMI_VECTOR, INTR_PRIVILEGE,
- breakpoint_exception, BREAKPOINT_VECTOR, USER_PRIVILEGE,
- overflow, OVERFLOW_VECTOR, USER_PRIVILEGE,
- bounds_check, BOUNDS_VECTOR, INTR_PRIVILEGE,
- inval_opcode, INVAL_OP_VECTOR, INTR_PRIVILEGE,
- copr_not_available, COPROC_NOT_VECTOR, INTR_PRIVILEGE,
- double_fault, DOUBLE_FAULT_VECTOR, INTR_PRIVILEGE,
- copr_seg_overrun, COPROC_SEG_VECTOR, INTR_PRIVILEGE,
- inval_tss, INVAL_TSS_VECTOR, INTR_PRIVILEGE,
- segment_not_present, SEG_NOT_VECTOR, INTR_PRIVILEGE,
- stack_exception, STACK_FAULT_VECTOR, INTR_PRIVILEGE,
- general_protection, PROTECTION_VECTOR, INTR_PRIVILEGE,
+ { divide_error, DIVIDE_VECTOR, INTR_PRIVILEGE },
+ { single_step_exception, DEBUG_VECTOR, INTR_PRIVILEGE },
+ { nmi, NMI_VECTOR, INTR_PRIVILEGE },
+ { breakpoint_exception, BREAKPOINT_VECTOR, USER_PRIVILEGE },
+ { overflow, OVERFLOW_VECTOR, USER_PRIVILEGE },
+ { bounds_check, BOUNDS_VECTOR, INTR_PRIVILEGE },
+ { inval_opcode, INVAL_OP_VECTOR, INTR_PRIVILEGE },
+ { copr_not_available, COPROC_NOT_VECTOR, INTR_PRIVILEGE },
+ { double_fault, DOUBLE_FAULT_VECTOR, INTR_PRIVILEGE },
+ { copr_seg_overrun, COPROC_SEG_VECTOR, INTR_PRIVILEGE },
+ { inval_tss, INVAL_TSS_VECTOR, INTR_PRIVILEGE },
+ { segment_not_present, SEG_NOT_VECTOR, INTR_PRIVILEGE },
+ { stack_exception, STACK_FAULT_VECTOR, INTR_PRIVILEGE },
+ { general_protection, PROTECTION_VECTOR, INTR_PRIVILEGE },
#if _WORD_SIZE == 4
- page_fault, PAGE_FAULT_VECTOR, INTR_PRIVILEGE,
- copr_error, COPROC_ERR_VECTOR, INTR_PRIVILEGE,
+ { page_fault, PAGE_FAULT_VECTOR, INTR_PRIVILEGE },
+ { copr_error, COPROC_ERR_VECTOR, INTR_PRIVILEGE },
#endif
{ hwint00, VECTOR( 0), INTR_PRIVILEGE },
{ hwint01, VECTOR( 1), INTR_PRIVILEGE },
*/
char params[128*sizeof(char *)]; /* boot monitor parameters */
register char *value; /* value in key=value pair */
- unsigned mon_start;
extern int etext, end;
/* Decide if mode is protected; 386 or higher implies protected mode.
* the process when PM is informed, because PM can block waiting for FS to
* do a core dump.
*/
- register struct proc *rp, *mmp;
+ register struct proc *rp;
message m;
rp = proc_addr(proc_nr);
* calling function will think an error occurred. This is not a problem,
* since no one uses the first BIOS interrupt vector.
*/
- phys_bytes phys_addr;
/* Check all acceptable ranges. */
-#if 0
+#if DEAD_CODE
if (vir_addr >= BIOS_MEM_BEGIN && vir_addr + bytes <= BIOS_MEM_END)
return (phys_bytes) vir_addr;
else if (vir_addr >= UPPER_MEM_BEGIN && vir_addr + bytes <= UPPER_MEM_END)
/* Dismember the request message. */
int irq_vec;
int irq_hook_id;
- int proc_nr;
int r = OK;
irq_hook_t *hook_ptr;
{
/* Handle sys_exit. A user process has exited (the PM sent the request).
*/
- register struct proc *rp, *rc;
- struct proc *np, *xp;
+ register struct proc *rc;
int exit_proc_nr;
/* Get a pointer to the process that exited. */
/* Handle sys_exit. A server or driver wants to exit. This may happen
* on a panic, but also is done when MINIX is shutdown.
*/
- register struct proc *rp;
int proc_nr = m_ptr->m_source; /* can only exit own process */
if (m_ptr->EXIT_STATUS != 0) {