File:  [DVB] / dietlibc / alpha / __testandset.S
Revision 1.4: download - view: text, annotated - select for diffs
Wed Feb 19 20:16:01 2003 UTC (21 years, 3 months ago) by olaf
Branches: MAIN
CVS tags: branch_rc14_fieldtest_finnland, branch_rc13_fieldtest_finnland, HEAD
alpha long time no check update (missing symboles)
libdl: minor flag changes

.text
.align 2
.global __testandset
.type	__testandset,@function
__testandset:
1:	ldq_l	$0, 0($16)		/* load lock */
	bne	$0, 1f			/* ok there is a lock... */
	lda	$0, 1($31)		/* load a 1 to register 0 */
	stq_c	$0, 0($16)		/* write lock is locked :) */
	beq	$0, 1b			/* oops someone changed MY lock */
1:	ret	$31, ($26), 0x01	/* return */

LinuxTV legacy CVS <linuxtv.org/cvs>