Skip to content

Commit 879e194

Browse files
committed
No need for running interrupt handlers in critical sections anymore.
Preemption correctly relies on the priority to do preemption, having a ithread->ithread preemption due to ithread sleeping at a lower priority should be ok.
1 parent 6eccee3 commit 879e194

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sys/kern/kern_ithread.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,12 @@ ithread(void *v_is)
5555
stray = 1;
5656

5757
for (ih = is->is_handlers; ih != NULL; ih = ih->ih_next) {
58+
is->is_scheduled = 0;
59+
5860
if ((ih->ih_flags & IPL_MPSAFE) == 0)
5961
KERNEL_LOCK();
6062

61-
is->is_scheduled = 0; /* protected by is->is_maxlevel */
62-
63-
crit_enter();
6463
irc = (*ih->ih_fun)(ih->ih_arg);
65-
crit_leave();
6664

6765
if ((ih->ih_flags & IPL_MPSAFE) == 0)
6866
KERNEL_UNLOCK();

0 commit comments

Comments
 (0)