roeber%netscape.com e597bf5b5e Import of Sleepycat DB 2.4.14.1
git-svn-id: svn://10.0.0.236/trunk@12863 18797224-902f-48f8-a5cc-f745e15eee43
1998-10-15 03:56:37 +00:00

25 lines
383 B
C++

/*
* @(#)x86.uslc
*
* UnixWare has threads in libthread, but OpenServer doesn't (yet).
*
* For cc/x86, 0 is clear, 1 is set.
*/
#if defined(__USLC__)
asm int
_tsl_set(void *tsl)
{
%mem tsl
movl tsl, %ecx
movl $1, %eax
lock
xchgb (%ecx),%al
xorl $1,%eax
}
#endif
#define TSL_SET(tsl) _tsl_set(tsl)
#define TSL_UNSET(tsl) (*(tsl) = 0)
#define TSL_INIT(tsl) TSL_UNSET(tsl)