From e286b0bbc04a34c181978efce19c6d0814e228c0 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 30 Jun 2010 02:02:46 +0000 Subject: Remove atomic register bit manipulation functions from i.MX and s3c target code and introduce generic functions for ARM (bitmod32, bitset32, and bitclr32). Multiprocessor support is possible but just not implemented at the moment, only interrupt lockout. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27188 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/system.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'firmware/export/system.h') diff --git a/firmware/export/system.h b/firmware/export/system.h index fe8121ce20..ee668c87e4 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h @@ -214,6 +214,11 @@ static inline __attribute__((always_inline)) uint32_t isolate_first_bit(uint32_t val) { return val & -val; } +/* Functions to set and clear register or variable bits atomically */ +void bitmod32(volatile uint32_t *addr, uint32_t bits, uint32_t mask); +void bitset32(volatile uint32_t *addr, uint32_t mask); +void bitclr32(volatile uint32_t *addr, uint32_t mask); + /* gcc 3.4 changed the format of the constraints */ #if (__GNUC__ >= 3) && (__GNUC_MINOR__ > 3) || (__GNUC__ >= 4) #define I_CONSTRAINT "I08" -- cgit v1.2.3