lkml.org 
[lkml]   [2004]   [Dec]   [11]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 11 Dec 2004 17:32:08 +0100
FromManfred Spraul <>
SubjectRe: RCU question
Zwane Mwaikambo wrote:

>On Fri, 10 Dec 2004, George Anzinger wrote:
>
> 
>
>>That is ok.  Either we have interrupts off and no softirqs are pending and we
>>proceed to the "hlt" (where the interrupt will be taken), or softirqs are
>>pending, we turn interrupts on, do the softirq, turn interrupts off and try
>>again.  Unless some tasklet (RCU?) never "gives up" or we will exit the while
>>with interrupts off and move on to the "hlt".  Or did I miss something?
>> 
>>
>
>But the point is that you cannot execute hlt with interrupts disabled.
> 
>
The trick is the sti instruction: It enables interrupt processing after 
the following instruction.

Thus
    sti
    hlt

cannot race - it atomically enables interrupts and waits.

--
    Manfred

-
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:08    [from the cache]
©2003-2008