Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

why preempt_disable before calling do_softirq in ksoftirqd

$
0
0

I am confused by preempt_disable/preempt_enable in the following code from ksoftirqd. It is a kernel thread, but why preempt must been disabled during do_softirq()?

for(;;) {    set_current_state(TASK_INTERRUPTIBLE );    schedule( );    /* now in TASK_RUNNING state */    while (local_softirq_pending( )) {        preempt_disable();        do_softirq( );        preempt_enable();        cond_resched( );    }}

Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>