Kernel/ARMv7 - Hacky (non-atomic) sync_and_fetch_4
authorJohn Hodge <[email protected]>
Tue, 17 Feb 2015 02:50:06 +0000 (10:50 +0800)
committerJohn Hodge <[email protected]>
Tue, 17 Feb 2015 02:50:06 +0000 (10:50 +0800)
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