diff options
Diffstat (limited to 'debian/htdig/htdig-3.2.0b6/db/sco.cc')
-rw-r--r-- | debian/htdig/htdig-3.2.0b6/db/sco.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/htdig/htdig-3.2.0b6/db/sco.cc b/debian/htdig/htdig-3.2.0b6/db/sco.cc new file mode 100644 index 00000000..6901f1ed --- /dev/null +++ b/debian/htdig/htdig-3.2.0b6/db/sco.cc @@ -0,0 +1,24 @@ +/* + * @(#)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 MUTEX_SET(tsl) _tsl_set(tsl) +#define MUTEX_UNSET(tsl) (*(tsl) = 0) +#define MUTEX_INIT(tsl) MUTEX_UNSET(tsl) |