Update of /cvsroot/alsa/alsa-lib/include
In directory sc8-pr-cvs1:/tmp/cvs-serv1186
Modified Files:
iatomic.h
Log Message:
arm section update
Index: iatomic.h
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/include/iatomic.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- iatomic.h 20 Feb 2003 19:24:01 -0000 1.10
+++ iatomic.h 14 Jun 2003 08:11:24 -0000 1.11
@@ -891,8 +891,38 @@
#endif /* __mips__ */
#ifdef __arm__
-/* we'll need to duplicate this code, too.. */
-#include <asm/proc/system.h>
+
+/*
+ * FIXME: bellow code is valid only for SA11xx
+ */
+
+/*
+ * Save the current interrupt enable state & disable IRQs
+ */
+#define local_irq_save(x) \
+ ({ \
+ unsigned long temp; \
+ __asm__ __volatile__( \
+ "mrs %0, cpsr @ local_irq_save\n" \
+" orr %1, %0, #128\n" \
+" msr cpsr_c, %1" \
+ : "=r" (x), "=r" (temp) \
+ : \
+ : "memory"); \
+ })
+
+/*
+ * restore saved IRQ & FIQ state
+ */
+#define local_irq_restore(x) \
+ __asm__ __volatile__( \
+ "msr cpsr_c, %0 @ local_irq_restore\n" \
+ : \
+ : "r" (x) \
+ : "memory")
+
+#define __save_flags_cli(x) local_irq_save(x)
+#define __restore_flags(x) local_irq_restore(x)
typedef struct { volatile int counter; } atomic_t;
-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog