diff options
author | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | 5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/alpha/alpha/interrupt.c | |
parent | 83e00d4274950d2b531c24692cd123538ffbddb9 (diff) | |
download | FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz |
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/alpha/alpha/interrupt.c')
-rw-r--r-- | sys/alpha/alpha/interrupt.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c index 489c948..0bdd6c5 100644 --- a/sys/alpha/alpha/interrupt.c +++ b/sys/alpha/alpha/interrupt.c @@ -90,7 +90,7 @@ interrupt(a0, a1, a2, framep) unsigned long a0, a1, a2; struct trapframe *framep; { - struct proc *p; + struct thread *td; #ifdef SMP critical_t s; #endif @@ -102,19 +102,21 @@ interrupt(a0, a1, a2, framep) s = critical_enter(); #endif globalp = (struct globaldata *) alpha_pal_rdval(); - p = curproc; + td = curthread; #ifdef SMP - p->p_md.md_kernnest++; + td->td_md.md_kernnest++; critical_exit(s); #endif - atomic_add_int(&p->p_intr_nesting_level, 1); + atomic_add_int(&td->td_intr_nesting_level, 1); +#ifndef KSTACK_GUARD #ifndef SMP { - if ((caddr_t) framep < (caddr_t) p->p_addr + 1024) { + if ((caddr_t) framep < (caddr_t) td->td_pcb + 1024) { panic("possible stack overflow\n"); } } #endif +#endif framep->tf_regs[FRAME_TRAPARG_A0] = a0; framep->tf_regs[FRAME_TRAPARG_A1] = a1; @@ -161,7 +163,7 @@ interrupt(a0, a1, a2, framep) a0, a1, a2); /* NOTREACHED */ } - atomic_subtract_int(&p->p_intr_nesting_level, 1); + atomic_subtract_int(&td->td_intr_nesting_level, 1); } void @@ -472,7 +474,7 @@ alpha_clock_interrupt(struct trapframe *framep) #ifdef SMP } else { mtx_lock_spin(&sched_lock); - hardclock_process(curproc, TRAPF_USERMODE(framep)); + hardclock_process(curthread, TRAPF_USERMODE(framep)); if ((schedclk2 & 0x7) == 0) statclock_process(curproc, TRAPF_PC(framep), TRAPF_USERMODE(framep)); |