spinlock_tryacquire_fastcall.asm
bitfixer_bitfixer/dg/z88dk/libsrc/_DEVELOPMENT/threads/mutex/c/sdcc_iy/spinlock_tryacquire_fastcall.asm

; int spinlock_tryacquire_fastcall(char *spinlock)

SECTION code_clib
SECTION code_threads_mutex

PUBLIC _spinlock_tryacquire_fastcall

_spinlock_tryacquire_fastcall:

   scf
   rr (hl)
    
   ld hl,1
   ret nc
    
   dec l
   ret
