repo.or.cz
/
dragonfly.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
rtld - do not allow both dynamic DTV index and static TLS offset
[dragonfly.git]
/
test
/
sysperf
/
mtx.s
blob
2ac10b6445869bf049a216c6d0c080d43091ceb3
1
/*
2
* $DragonFly: src/test/sysperf/mtx.s,v 1.2 2006/04/22 22:32:52 dillon Exp $
3
*/
4
.text
5
.globl get_mtx
6
.globl rel_mtx
7
.globl try_spin_mtx
8
.globl rel_spin_mtx
9
10
get_mtx
:
11
movl mtx
,%
edx
12
movl
4
(%
esp
),%
ecx
13
1
:
subl
%
eax
,%
eax
14
lock cmpxchgl
%
ecx
,(%
edx
)
15
jnz
1
b
16
ret
17
18
rel_mtx
:
19
movl mtx
,%
edx
20
movl $
0
,(%
edx
)
21
ret
22
23
try_spin_mtx
:
24
movl mtx
,%
edx
25
movl $
1
,%
eax
26
xchgl
%
eax
,(%
edx
)
27
ret
28
29
rel_spin_mtx
:
30
movl mtx
,%
edx
31
movl $
0
,(%
edx
)
32
ret