OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [src/] [arch/] [arm/] [v5/] [atomic.S.ARM] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Copyright (C) 2010 B Labs
3
 *
4
 * Author: Bahadir Balban
5
 */
6
 
7
#include INC_ARCH(asm.h)
8
 
9
/*
10
 * Atomically and destructively reads a byte. E.g.
11
 * byte is read and zero is written back. This is
12
 * useful on reading irq counts
13
 *
14
 * @r0 = byte address
15
 */
16
BEGIN_PROC(l4_atomic_dest_readb)
17
        mov     r1, #0
18
        swpb    r2, r1, [r0]
19
        mov     r0, r2
20
        mov     pc, lr
21
END_PROC(l4_atomic_dest_readb)
22
 
23
 
24
 
25
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.