On 4/17/06, Om Narasimhan <om.turyx@xxxxxxxxx> wrote:
according to the test at:
http://lxr.linux.no/source/arch/i386/kernel/entry.S#L180
the condition states that if preemp_count is zero then kernel preemption is allowed and as Jan said:
see code at:
http://lxr.linux.no/source/include/linux/preempt.h#L29
hope this helps
MHD.Tayseer
On 4/17/06, Jan Hudec <bulb@xxxxxx> wrote:
> On Sun, Apr 16, 2006 at 12:38:52 +0200, tyler@xxxxxxxx wrote:
> > On Sun, Apr 16, 2006 at 04:56:12PM +0800, Min-Hua Chen wrote:
> > > hi:
<snip>
> No bug, really. The comparison is INTEGERAL (there is no other in C, right)
> and preempt_count actually IS a COUNT, saying how many times preemption
> disable was requested. We are in atomic, if it was not requested, or it was
> requested by BKL (ie. kernel_locked() == 1 && preempt_count() == 1).
hm... I still have difficulty in understanding.
Does it mean that if the value of preempt_count (say X) is because of
X number of lock_kernel requests, it is preemptible?
according to the test at:
http://lxr.linux.no/source/arch/i386/kernel/entry.S#L180
the condition states that if preemp_count is zero then kernel preemption is allowed and as Jan said:
preempt_count actually IS a COUNT, saying how many times preemption
disable was requested.
disable was requested.
http://lxr.linux.no/source/include/linux/preempt.h#L29
hope this helps
MHD.Tayseer
Another question is, why the value of PREEMPT_ACTIVE is 0x10000000 in
i386? It seems to be different in different architectures
Regards,
Om
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/