why isync in atomic icc and return and atomic dec and return for CONFIG_SMP

Michael R. Zucca mrz5149 at acm.org
Mon Aug 5 00:26:39 EST 2002


At 10:28 AM -0400 8/3/02, Kevin B. Hendricks wrote:

>In userland code, say with a fully pre-emptible kernel, if a signal comes
>in to thread A and before returning another thread (call it B)  is run,
>couldn't the same problem happen with prefetching data being old since
>thread B may in fact be the one holding the lock and allowed to change the
>data.
>
>I guess what I am asking is would we need the isync for a userland version
>of this code if threads could actually be pre-empted even for a UP
>machine?

I would imagine this still isn't necessary because a preemption must happen
as the result of an interrupt, which means an rfi gets executed. rfi is
context synchronizing, just like isync.

Voluntary context switching would involve making a syscall and sc is also
context synchronzing.

So I think all of the bases are covered for UP.


----------------------------------------------
 Michael Zucca - mrz5149 at acm.org
----------------------------------------------
 "I'm too old to use Emacs." -- Rod MacDonald
----------------------------------------------


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list