intr_disabled() tests removed

- we don't need to test this in kernel as we always have interrupts
  disabled

- if interrupts are enabled in kernel, it is only at very carefully
  chosen places. There are no such places now.
This commit is contained in:
Tomas Hruby 2010-02-09 15:29:58 +00:00
parent c6fec6866f
commit c9da61022b
6 changed files with 0 additions and 21 deletions

View file

@ -21,10 +21,6 @@ check_runqueues_f(char *file, int line)
int q, l = 0; int q, l = 0;
register struct proc *xp; register struct proc *xp;
if(!intr_disabled()) {
minix_panic("check_runqueues called with interrupts enabled", NO_NUM);
}
FIXME("check_runqueues being done"); FIXME("check_runqueues being done");
#define MYPANIC(msg) { \ #define MYPANIC(msg) { \

View file

@ -52,7 +52,6 @@
varname = ENTERED; varname = ENTERED;
#define NOREC_RETURN(varname, v) do { \ #define NOREC_RETURN(varname, v) do { \
vmassert(intr_disabled()); \
vmassert(magictest == MAGICTEST); \ vmassert(magictest == MAGICTEST); \
vmassert(varname == ENTERED || varname == NOTENTERED); \ vmassert(varname == ENTERED || varname == NOTENTERED); \
varname = NOTENTERED; \ varname = NOTENTERED; \

View file

@ -154,7 +154,6 @@ PUBLIC struct proc * schedcheck(void)
* to be scheduled again. * to be scheduled again.
*/ */
NOREC_ENTER(schedch); NOREC_ENTER(schedch);
vmassert(intr_disabled());
/* /*
* if the current process is still runnable check the misc flags and let * if the current process is still runnable check the misc flags and let
@ -784,8 +783,6 @@ endpoint_t dst_e; /* which process to notify */
int r; int r;
int dst_p; int dst_p;
vmassert(intr_disabled());
if (!isokendpt(dst_e, &dst_p)) { if (!isokendpt(dst_e, &dst_p)) {
util_stacktrace(); util_stacktrace();
kprintf("mini_notify: bogus endpoint %d\n", dst_e); kprintf("mini_notify: bogus endpoint %d\n", dst_e);
@ -1178,7 +1175,6 @@ register struct proc *rp; /* this process is now runnable */
NOREC_ENTER(enqueuefunc); NOREC_ENTER(enqueuefunc);
#if DEBUG_SCHED_CHECK #if DEBUG_SCHED_CHECK
if(!intr_disabled()) { minix_panic("enqueue with interrupts enabled", NO_NUM); }
if (rp->p_ready) minix_panic("enqueue already ready process", NO_NUM); if (rp->p_ready) minix_panic("enqueue already ready process", NO_NUM);
#endif #endif
@ -1238,7 +1234,6 @@ PRIVATE void enqueue_head(struct proc *rp)
int q; /* scheduling queue to use */ int q; /* scheduling queue to use */
#if DEBUG_SCHED_CHECK #if DEBUG_SCHED_CHECK
if(!intr_disabled()) { minix_panic("enqueue with interrupts enabled", NO_NUM); }
if (rp->p_ready) minix_panic("enqueue already ready process", NO_NUM); if (rp->p_ready) minix_panic("enqueue already ready process", NO_NUM);
#endif #endif
@ -1292,7 +1287,6 @@ register struct proc *rp; /* this process is no longer runnable */
#endif #endif
#if DEBUG_SCHED_CHECK #if DEBUG_SCHED_CHECK
if(!intr_disabled()) { minix_panic("dequeue with interrupts enabled", NO_NUM); }
if (! rp->p_ready) minix_panic("dequeue() already unready process", NO_NUM); if (! rp->p_ready) minix_panic("dequeue() already unready process", NO_NUM);
#endif #endif
@ -1404,8 +1398,6 @@ timer_t *tp; /* watchdog timer pointer */
clock_t next_period; /* time of next period */ clock_t next_period; /* time of next period */
int ticks_added = 0; /* total time added */ int ticks_added = 0; /* total time added */
vmassert(!intr_disabled());
for (rp=BEG_PROC_ADDR; rp<END_PROC_ADDR; rp++) { for (rp=BEG_PROC_ADDR; rp<END_PROC_ADDR; rp++) {
if (! isemptyp(rp)) { /* check slot use */ if (! isemptyp(rp)) { /* check slot use */
if (rp->p_priority > rp->p_max_priority) { /* update priority? */ if (rp->p_priority > rp->p_max_priority) { /* update priority? */

View file

@ -163,23 +163,19 @@ struct proc {
/* Set flag and dequeue if the process was runnable. */ /* Set flag and dequeue if the process was runnable. */
#define RTS_SET(rp, f) \ #define RTS_SET(rp, f) \
do { \ do { \
vmassert(intr_disabled()); \
if(proc_is_runnable(rp)) { dequeue(rp); } \ if(proc_is_runnable(rp)) { dequeue(rp); } \
(rp)->p_rts_flags |= (f); \ (rp)->p_rts_flags |= (f); \
vmassert(intr_disabled()); \
} while(0) } while(0)
/* Clear flag and enqueue if the process was not runnable but is now. */ /* Clear flag and enqueue if the process was not runnable but is now. */
#define RTS_UNSET(rp, f) \ #define RTS_UNSET(rp, f) \
do { \ do { \
int rts; \ int rts; \
vmassert(intr_disabled()); \
rts = (rp)->p_rts_flags; \ rts = (rp)->p_rts_flags; \
(rp)->p_rts_flags &= ~(f); \ (rp)->p_rts_flags &= ~(f); \
if(!rts_f_is_runnable(rts) && proc_is_runnable(rp)) { \ if(!rts_f_is_runnable(rts) && proc_is_runnable(rp)) { \
enqueue(rp); \ enqueue(rp); \
} \ } \
vmassert(intr_disabled()); \
} while(0) } while(0)
/* Set flags to this value. */ /* Set flags to this value. */

View file

@ -137,8 +137,6 @@ irq_hook_t *hook;
*/ */
int proc_nr; int proc_nr;
vmassert(intr_disabled());
/* As a side-effect, the interrupt handler gathers random information by /* As a side-effect, the interrupt handler gathers random information by
* timestamping the interrupt events. This is used for /dev/random. * timestamping the interrupt events. This is used for /dev/random.
*/ */
@ -158,7 +156,6 @@ irq_hook_t *hook;
priv(proc_addr(proc_nr))->s_int_pending |= (1 << hook->notify_id); priv(proc_addr(proc_nr))->s_int_pending |= (1 << hook->notify_id);
/* Build notification message and return. */ /* Build notification message and return. */
vmassert(intr_disabled());
mini_notify(proc_addr(HARDWARE), hook->proc_nr_e); mini_notify(proc_addr(HARDWARE), hook->proc_nr_e);
return(hook->policy & IRQ_REENABLE); return(hook->policy & IRQ_REENABLE);
} }

View file

@ -10,7 +10,6 @@
#define FIXLINMSG(prp) { prp->p_delivermsg_lin = umap_local(prp, D, prp->p_delivermsg_vir, sizeof(message)); } #define FIXLINMSG(prp) { prp->p_delivermsg_lin = umap_local(prp, D, prp->p_delivermsg_vir, sizeof(message)); }
#define PHYS_COPY_CATCH(src, dst, size, a) { \ #define PHYS_COPY_CATCH(src, dst, size, a) { \
vmassert(intr_disabled()); \
catch_pagefaults++; \ catch_pagefaults++; \
a = phys_copy(src, dst, size); \ a = phys_copy(src, dst, size); \
catch_pagefaults--; \ catch_pagefaults--; \