Thread (5 messages) 5 messages, 4 authors, 2007-07-09

Re: PI mutex support on ARM

From: Remy Bohmer <hidden>
Date: 2007-07-08 20:17:52
Also in: lkml

Hello Ingo,
patch format problem: never diff the asm/ files, diff the asm-arm/ files.
Yeah, of course, I know, I believe I made a real mess of this one ...
is it safe to do a get_user() with irqs off?
rhetorical question ;-))
I was wondering, Is it safe to use a normal spinlock here, like this?

------- 8-< -------------
	spin_lock(&futex_lock);

	err = get_user(uval, uaddr);
	if ((!err) && (uval == oldval))
		err = put_user(newval, uaddr);

	spin_unlock(&futex_lock);
------- 8-< -------------
is this method of atomic ops SMP-safe?
another rhetorical question ;-))
Nope, I already knew that, that why I mentioned that it probably only
worked on UP...

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