What's the meaning of PREEMPT_ACTIVE in preempt_count?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux