Re: How spin_lock and preempt disable works?

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

 





On 4/29/06, Hareesh Nagarajan <hnagar2@xxxxxxxxx> wrote:
On 4/29/06, Manjunath Naik <peter.desouzain@xxxxxxxxx> wrote:

> I was not able to understand what exaclty is happened in this macro.
...
[snip]
...
> But I was not able to understand how exactly it works:
...
[snip]
...
> #define preempt_disable() \
> But I was not able to understand how exactly preempting works. when

While we hold a spin lock to protect a critical region, it is
necessary for us to disable preemption. To disable preemption, we
increment the preempt count.

> schedular wants to schedule the other process, it checks the
> thread_info->preempt_count value? If it is yes plese provide me some links
> or code reference for it.

Documentation/preempt- locking.txt

--
./hareesh

If prempt_count is incremented how it will leads to disable the preemption? who will check the counter? Is scheduler will check this counter before selecting other process for context switch. If yes, how sheduler gets the priority to run itself.
 
 
 
 

[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