mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-30 13:38:40 +00:00
df29ccb6c0
This semantic was already true for atomic operations within the kernel, and this change makes it true for the fast atomic syscalls (__NR_cmpxchg and __NR_atomic_update) as well. Previously, user-space had to use the fast atomic syscalls exclusively to update memory, since raw stores could lose a race with the atomic update code even when the atomic update hadn't actually modified the value. With this change, we no longer write back the value to memory if it hasn't changed. This allows certain types of idioms in user space to work as expected, e.g. "atomic exchange" to acquire a spinlock, followed by a raw store of zero to release the lock. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> |
||
---|---|---|
.. | ||
atomic_32.c | ||
atomic_asm_32.S | ||
cacheflush.c | ||
checksum.c | ||
cpumask.c | ||
delay.c | ||
exports.c | ||
Makefile | ||
memchr_32.c | ||
memcpy_32.S | ||
memcpy_tile64.c | ||
memmove.c | ||
memset_32.c | ||
spinlock_32.c | ||
spinlock_common.h | ||
strchr_32.c | ||
strlen_32.c | ||
uaccess.c | ||
usercopy_32.S |