lkml.org 
[lkml]   [2004]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Documentation/preempt-locking.txt clarification
Thomas Hood <jdthood@yahoo.co.uk> wrote:
>
> I have tried to clarify the text while at the same time
> preserving the original meaning. Everything is pretty clear
> now except for the last paragraph which I still find baffling.
> I don't know what "a test to see if preemption is required" is
> exactly and I don't understand when such a test is required.

I guess it's saying that if you do this:

local_irq_disable();
lah_de_dah();
local_irq_enable();

then you should follow that by

preempt_check_resched();

just in case someone told this task to preempt itself while it had
interrupts disabled.

But I don't see why that's needed: if the preempt command came from another
CPU then this CPU will take the cross-CPU interrupt as soon as interrupts
are enabled. And the preempt command couldn't have come from _this_ CPU,
because it had interrupts disabled.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [from the cache]
©2003-2011 Jasper Spaans