Nov. 7, 2011
2:38 a.m.
Hi, The preempt_count contains a PREEMPT_ACTIVE flag. In cond_resched() and preempt_schedule(), there is a pattern which is like this: add_preempt_count(PREEMPT_ACTIVE); schedule(); sub_preempt_count(PREEMPT_ACTIVE); I wonder what's the role which PREEMPT_ACTIVE plays. Why we need to add to it before schedule() and sub from it after?