repo.or.cz
/
glibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Update.
[glibc.git]
/
db2
/
mutex
/
sco.cc
blob
7c165a20724fa6393f848df091240a34aeed22c5
1
/*
2
* @(#)x86.uslc
3
*
4
* UnixWare has threads in libthread, but OpenServer doesn't (yet).
5
*
6
* For cc/x86, 0 is clear, 1 is set.
7
*/
8
9
#if defined(__USLC__)
10
asm
int
11
_tsl_set
(
void
*
tsl
)
12
{
13
%
mem tsl
14
movl tsl
, %
ecx
15
movl $
1
, %
eax
16
lock
17
xchgb
(%
ecx
),%
al
18
xorl $
1
,%
eax
19
}
20
#endif
21
22
#define TSL_SET(tsl) _tsl_set(tsl)
23
#define TSL_UNSET(tsl) (*(tsl) = 0)
24
#define TSL_INIT(tsl) TSL_UNSET(tsl)