Added forgotten files

This commit is contained in:
Bahadir Balban
2010-04-06 20:05:35 +03:00
parent a02d08236b
commit aef14b55ec
4 changed files with 114 additions and 0 deletions

25
src/arch/arm/v5/atomic.S Normal file
View File

@@ -0,0 +1,25 @@
/*
* Copyright (C) 2010 B Labs
*
* Author: Bahadir Balban
*/
#include INC_ARCH(asm.h)
/*
* Atomically and destructively reads a byte. E.g.
* byte is read and zero is written back. This is
* useful on reading irq counts
*
* @r0 = byte address
*/
BEGIN_PROC(l4_atomic_dest_readb)
mov r1, #0
swpb r2, r1, [r0]
mov r0, r2
mov pc, lr
END_PROC(l4_atomic_dest_readb)