diff options
Diffstat (limited to 'debian/htdig/htdig-3.2.0b6/db/ia64.gcc')
-rw-r--r-- | debian/htdig/htdig-3.2.0b6/db/ia64.gcc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/htdig/htdig-3.2.0b6/db/ia64.gcc b/debian/htdig/htdig-3.2.0b6/db/ia64.gcc new file mode 100644 index 00000000..bf12a96f --- /dev/null +++ b/debian/htdig/htdig-3.2.0b6/db/ia64.gcc @@ -0,0 +1,18 @@ +/* + * $Id: ia64.gcc,v 1.2 2002/02/02 18:18:05 ghutchis Exp $ + * + * For gcc/ia64, 0 is clear, 1 is set. + */ +#define MUTEX_SET(tsl) ({ \ + register tsl_t *__l = (tsl); \ + long __r; \ + asm volatile("xchg1 %0=%1,%3" : "=r"(__r), "=m"(*__l) : "1"(*__l), "r"(1));\ + __r ^ 1; \ +}) + +/* + * Store through a "volatile" pointer so we get a store with "release" + * semantics. + */ +#define MUTEX_UNSET(tsl) (*(volatile unsigned char *)(tsl) = 0) +#define MUTEX_INIT(tsl) MUTEX_UNSET(tsl) |