aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sh/sys/user.h
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@mellanox.com>2016-11-10 20:08:24 -0500
committerChris Metcalf <cmetcalf@mellanox.com>2016-11-10 20:08:24 -0500
commita329844ff8adaffc25343a6f9bb12a3a9e841018 (patch)
tree8079df2592ed6345ad42be727fe110bddc852c99 /sysdeps/unix/sysv/linux/sh/sys/user.h
parentb4e75104b432e86dc8e308e8f58391bee6b33d78 (diff)
downloadglibc-a329844ff8adaffc25343a6f9bb12a3a9e841018.tar
glibc-a329844ff8adaffc25343a6f9bb12a3a9e841018.tar.gz
glibc-a329844ff8adaffc25343a6f9bb12a3a9e841018.tar.bz2
glibc-a329844ff8adaffc25343a6f9bb12a3a9e841018.zip
Make sure tilepro uses kernel atomics fo atomic_store
It's not legal for raw stores to be mixed with atomic operations on tilepro, since the atomics are managed by kernel fast syscalls. It's possible for a hardware store and a kernel fast atomic to race with each other in such a way that the hardware store is lost. Suppose you have an initial zero value, and you race with a store of 2 and a kernel cmpxchg from 0 to 1. The legal output is only 2: either the store hit first and the cmpxchg failed, or the cmpxchg hit first and succeeded, then was overwritten by the 2. But if the kernel cmpxchg starts first and loads the zero, then the store hits and sets the value to 2, the cmpxchg will still decide it was successful and write the 1, leaving the value illegally set to 1. Using atomic_exchange variants to implement atomic_store fixes this problem for tilepro.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sh/sys/user.h')
0 files changed, 0 insertions, 0 deletions