1 ! Copyright (C) 2013 Imagination Technologies Ltd.
3 ! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
5 #include <pthread-errnos.h>
8 .global _pthread_spin_trylock
9 .type _pthread_spin_trylock,function
10 _pthread_spin_trylock:
11 1: MOVT D0Re0, #HI(#EBUSY)
12 ADD D0Re0, D0Re0, #LO(#EBUSY)
13 LNKGETD D0Ar2, [D1Ar1]
16 LNKSETDEQ [D1Ar1], D0Ar2
19 ANDT D0Ar2, D0Ar2, #HI(0x3f000000)
20 CMPT D0Ar2, #HI(0x02000000)
24 .size _pthread_spin_trylock,.-_pthread_spin_trylock