Kernel/ARMv7 - Hacky (non-atomic) sync_and_fetch_4
[tpg/acess2.git] / KernelLand / Kernel / arch / armv7 / lib.S
index e2f0613..554d7a1 100644 (file)
@@ -82,3 +82,11 @@ __divmod32_asm:
        pop {r4}
        mov pc, lr
 
+.globl __sync_fetch_and_and_4
+__sync_fetch_and_and_4:
+       mov r2, r0
+       ldr r0, [r2]
+       mov r3, r0
+       and r3, r1
+       str r3, [r2]
+       mov pc, lr

UCC git Repository :: git.ucc.asn.au