Thread (29 messages) 29 messages, 6 authors, 2009-09-18

LDREX/STREX and pre-emption on SMP hardware

flat view

From: Jamie Lokier <hidden>
Date: 2009-08-21 15:50:11

Catalin Marinas wrote:
On Fri, 2009-08-21 at 16:07 +0100, Richard Crewe wrote:
quoted
Section A2.9.3 of the ARM architecture ref. manual seems to imply that 
ldrex/strex instruction pairs won't work correctly if they are nested 
due to pre-emption.

Should a strex instruction be added to the low-level interrupt handler 
or should all ldrex/strex instruction pairs be protected from 
pre-emption by disabling interrupts?
There is no need to since preemption means rescheduling which implies a
call to the __switch_to function in entry-armv.S. This function clears
the exclusive monitor state explicitly.
What about when an interrupt handler uses ldrex/strex?  There is no
call to __switch_to.

-- Jamie
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help