aboutsummaryrefslogtreecommitdiff
path: root/src/libthread
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-02-09 08:20:11 +0000
committerrsc <devnull@localhost>2006-02-09 08:20:11 +0000
commitbafbb3918af74080aebc6efeb722dae9a49462b7 (patch)
treee3fca40a21adde4cabd0c0894a66ae1022f3720d /src/libthread
parentc0811e687d285f065f68c72d89a3292843e198f1 (diff)
downloadplan9port-bafbb3918af74080aebc6efeb722dae9a49462b7.tar.gz
plan9port-bafbb3918af74080aebc6efeb722dae9a49462b7.tar.bz2
plan9port-bafbb3918af74080aebc6efeb722dae9a49462b7.zip
doubtful this will work
Diffstat (limited to 'src/libthread')
-rw-r--r--src/libthread/Linux-sparc64-asm.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libthread/Linux-sparc64-asm.s b/src/libthread/Linux-sparc64-asm.s
new file mode 100644
index 00000000..c371266f
--- /dev/null
+++ b/src/libthread/Linux-sparc64-asm.s
@@ -0,0 +1,13 @@
+ .section ".text", #alloc, #execinstr
+ .align 8
+ .skip 16
+ .global _tas
+! .type _tas,2
+_tas:
+ or %g0,1,%o1
+ swap [%o0],%o1 ! o0 points to lock; key is first word
+ retl
+ mov %o1, %o0
+
+ .size _tas,(.-_tas)
+