Thread (12 messages) 12 messages, 7 authors, 2009-06-30

Re: Inline Assembly queries

From: Paul Mackerras <hidden>
Date: 2009-06-30 09:52:50

Possibly related (same subject, not in this thread)

kernel mailz writes:
Consider atomic_add and atomic_add_return in kernel code.
I am not able to figure out why "memory" is added in latter
The "memory" indicates that gcc should not reorder accesses to memory
from one side of the asm to the other.  The reason for putting it on
the atomic ops that return a value is that they are sometimes used to
implement locks or other synchronization primitives.

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