/*
 * @(#)alpha.dec	8.3 (Sleepycat Software) 1/18/97
 *
 * The DEC C asm acts as a pseudo-call.  The first argument is the assembly
 * code, and the remaining arguments are assigned as in a procedure call, to
 * r16, r17, etc. (represented in asm as %a0, %a1, and so forth).
 *
 * From: Dave Butenhof.
 */

#include <c_asm.h>

#define	TSL_SET(tsl)	(asm ("mb;					\
    10:	ldl_l	%v0,(%a0) ;						\
	bne	%v0,30f ;						\
	or	%v0,1,%r1 ;						\
	stl_c	%r1,(%a0) ;						\
	beq	%r1,20f ;						\
	mb	;							\
	br	%r31,30f ;						\
    20:	br	%r31,10b ;						\
    30:	", (tsl)))

THIS WAS NOT CONVERTED TO TAKE A POINTER AS AN ARGUMENT...
#define	TSL_UNSET(tsl)	(asm ("mb"), *(tsl) = 0)
