summaryrefslogtreecommitdiff
path: root/src/thread
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/thread
parent1b0cdc8700d29ef018bf226d74b2b58b23bce91c (diff)
downloadmusl-f9d84554bae0fa17c9a1d724549c4408022228a5.tar.gz
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/thread')
-rw-r--r--src/thread/sh/__set_thread_area.s6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/thread/sh/__set_thread_area.s b/src/thread/sh/__set_thread_area.s
index d9f11810..e69de29b 100644
--- a/src/thread/sh/__set_thread_area.s
+++ b/src/thread/sh/__set_thread_area.s
@@ -1,6 +0,0 @@
-.global __set_thread_area
-.type __set_thread_area, @function
-__set_thread_area:
- ldc r4, gbr
- rts
- mov #0, r0