about summary refs log tree commit diff
path: root/src/unistd/sync.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-06-16 14:28:30 +0000
committerRich Felker <dalias@aerifal.cx>2015-06-16 14:38:41 +0000
commitf9d84554bae0fa17c9a1d724549c4408022228a5 (patch)
treee40d11d2c4af3c4bef11720664e92a288e6d37e4 /src/unistd/sync.c
parent1b0cdc8700d29ef018bf226d74b2b58b23bce91c (diff)
downloadmusl-f9d84554bae0fa17c9a1d724549c4408022228a5.tar.gz
musl-f9d84554bae0fa17c9a1d724549c4408022228a5.tar.xz
musl-f9d84554bae0fa17c9a1d724549c4408022228a5.zip
add support for sh2 interrupt-masking-based atomics to sh port
the sh2 target is being considered an ISA subset of sh3/sh4, in the
sense that binaries built for sh2 are intended to be usable on later
cpu models/kernels with mmu support. so rather than hard-coding
sh2-specific atomics, the runtime atomic selection mechanisms that was
already in place has been extended to add sh2 atomics.

at this time, the sh2 atomics are not SMP-compatible; since the ISA
lacks actual atomic operations, the new code instead masks interrupts
for the duration of the atomic operation, producing an atomic result
on single-core. this is only possible because the kernel/hardware does
not impose protections against userspace doing so. additional changes
will be needed to support future SMP systems.

care has been taken to avoid producing significant additional code
size in the case where it's known at compile-time that the target is
not sh2 and does not need sh2-specific code.
Diffstat (limited to 'src/unistd/sync.c')
0 files changed, 0 insertions, 0 deletions