Update.
[glibc.git] / db2 / mutex / sco.cc
blob7c165a20724fa6393f848df091240a34aeed22c5
1 /*
2 * @(#)x86.uslc
4 * UnixWare has threads in libthread, but OpenServer doesn't (yet).
6 * For cc/x86, 0 is clear, 1 is set.
7 */
9 #if defined(__USLC__)
10 asm int
11 _tsl_set(void *tsl)
13 %mem tsl
14 movl tsl, %ecx
15 movl $1, %eax
16 lock
17 xchgb (%ecx),%al
18 xorl $1,%eax
20 #endif
22 #define TSL_SET(tsl) _tsl_set(tsl)
23 #define TSL_UNSET(tsl) (*(tsl) = 0)
24 #define TSL_INIT(tsl) TSL_UNSET(tsl)