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

LDREX/STREX and pre-emption on SMP hardware

flat view

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2009-09-14 11:47:12

On Mon, 2009-09-14 at 11:06 +0100, Catalin Marinas wrote:
On Mon, 2009-09-14 at 11:00 +0100, Russell King - ARM Linux wrote:
quoted
It doesn't matter though - consider two threads using LDREX on the same
location:

	T1		T2
	LDREX
			LDREX
			STREXEQ (not satsified)
	STREX
As I replied to Jamie on a similar issue, you can have:

T1			T2
LDREX
			LDREX
			STREXEQ (satisfied, succeeds)
			LDREX
			STREXEQ (not satisfied)
STREX (succeeds)

Though this may be an unlikely sequence.
Searching for STREXEQ, it looks like there are several other locking
functions using it in spinlock.h. Do we have a real problem with these?

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