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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [libl4/] [src/] [arch/] [or1k/] [v5/] [atomic.S.ARM] - Rev 7

Compare with Previous | Blame | View Log

/*
 * Copyright (C) 2010 B Labs
 *
 * Author: Bahadir Balban
 */

#include <l4lib/arch/arm/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)




Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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