tdoubtful this will work - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit bafbb3918af74080aebc6efeb722dae9a49462b7
(DIR) parent c0811e687d285f065f68c72d89a3292843e198f1
(HTM) Author: rsc <devnull@localhost>
Date: Thu, 9 Feb 2006 08:20:11 +0000
doubtful this will work
Diffstat:
A src/libthread/Linux-sparc64-asm.s | 13 +++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/src/libthread/Linux-sparc64-asm.s b/src/libthread/Linux-sparc64-asm.s
t@@ -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)
+