diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
| commit | 37da2899f40661e3e9631e497da8dc59b971cbd0 (patch) | |
| tree | cbc6d4680e347d906f5fa7fca73214418741df72 /lib9/lock-Solaris-sparc.s | |
| parent | 54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff) | |
20060303a
Diffstat (limited to 'lib9/lock-Solaris-sparc.s')
| -rw-r--r-- | lib9/lock-Solaris-sparc.s | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib9/lock-Solaris-sparc.s b/lib9/lock-Solaris-sparc.s new file mode 100644 index 00000000..d0f9399f --- /dev/null +++ b/lib9/lock-Solaris-sparc.s @@ -0,0 +1,20 @@ + + .section ".text", #alloc, #execinstr + .align 8 + .skip 16 + .global canlock + .type canlock,2 + +canlock: + or %g0,1,%o1 + swap [%o0],%o1 ! o0 points to lock; key is first word + cmp %o1,1 + bne .gotit + nop + retl ! key was 1 + or %g0,0,%o0 +.gotit: + retl ! key was not 1 + or %g0,1,%o0 + + .size canlock,(.-canlock) |
