Use intr_disable/intr_restore instead of doing it manually.

Submitted by:	tmm
This commit is contained in:
Jake Burkholder 2002-03-13 04:43:45 +00:00
parent 23c27fc6d9
commit 63a33ce158

View File

@ -124,9 +124,7 @@ intr_setup(int pri, ih_func_t *ihf, int vec, iv_func_t *ivf, void *iva)
{
u_long ps;
ps = rdpr(pstate);
if (ps & PSTATE_IE)
wrpr(pstate, ps, PSTATE_IE);
ps = intr_disable();
if (vec != -1) {
intr_vectors[vec].iv_func = ivf;
intr_vectors[vec].iv_arg = iva;
@ -134,7 +132,7 @@ intr_setup(int pri, ih_func_t *ihf, int vec, iv_func_t *ivf, void *iva)
intr_vectors[vec].iv_vec = vec;
}
intr_handlers[pri] = ihf;
wrpr(pstate, ps, 0);
intr_restore(ps);
}
static void