patch-2.1.121 linux/include/asm-arm/atomic.h
Next file: linux/include/asm-arm/elf.h
Previous file: linux/include/asm-arm/arch-vnc/uncompress.h
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Sun Sep 6 10:45:30 1998
- Orig file:
v2.1.120/linux/include/asm-arm/atomic.h
- Orig date:
Tue Jan 20 16:39:42 1998
diff -u --recursive --new-file v2.1.120/linux/include/asm-arm/atomic.h linux/include/asm-arm/atomic.h
@@ -7,20 +7,22 @@
* 27-06-1996 RMK Created
* 13-04-1997 RMK Made functions atomic!
* 07-12-1997 RMK Upgraded for v2.1.
+ * 26-08-1998 PJB Added #ifdef __KERNEL__
*/
#ifndef __ASM_ARM_ATOMIC_H
#define __ASM_ARM_ATOMIC_H
+typedef struct { int counter; } atomic_t;
+
+#define ATOMIC_INIT(i) { (i) }
+
+#ifdef __KERNEL__
#include <asm/system.h>
#ifdef __SMP__
#error SMP not supported
#endif
-typedef struct { int counter; } atomic_t;
-
-#define ATOMIC_INIT(i) { (i) }
-
#define atomic_read(v) ((v)->counter)
#define atomic_set(v,i) (((v)->counter) = (i))
@@ -82,4 +84,5 @@
restore_flags (flags);
}
+#endif
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov