patch-2.4.0-test9 linux/include/asm-sparc/atomic.h
Next file: linux/include/asm-sparc/bitops.h
Previous file: linux/include/asm-sh/unistd.h
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Tue Oct 3 09:24:41 2000
- Orig file:
v2.4.0-test8/linux/include/asm-sparc/atomic.h
- Orig date:
Thu Sep 7 08:32:01 2000
diff -u --recursive --new-file v2.4.0-test8/linux/include/asm-sparc/atomic.h linux/include/asm-sparc/atomic.h
@@ -8,19 +8,12 @@
#include <linux/config.h>
-#ifdef CONFIG_SMP
-/* This is a temporary measure. -DaveM */
typedef struct { volatile int counter; } atomic_t;
-#define ATOMIC_INIT(i) { (i << 8) }
-#else
-typedef struct { int counter; } atomic_t;
-#define ATOMIC_INIT(i) { (i) }
-#endif
#ifdef __KERNEL__
-
#ifndef CONFIG_SMP
+#define ATOMIC_INIT(i) { (i) }
#define atomic_read(v) ((v)->counter)
#define atomic_set(v, i) (((v)->counter) = i)
@@ -38,6 +31,8 @@
* ----------------------------------------
* 31 8 7 0
*/
+
+#define ATOMIC_INIT(i) { (i << 8) }
static __inline__ int atomic_read(atomic_t *v)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)