patch-2.4.0-test9 linux/include/asm-sh/atomic.h
Next file: linux/include/asm-sh/bitops.h
Previous file: linux/include/asm-s390/resource.h
Back to the patch index
Back to the overall index
- Lines: 80
- Date:
Tue Oct 3 09:24:40 2000
- Orig file:
v2.4.0-test8/linux/include/asm-sh/atomic.h
- Orig date:
Tue Apr 25 16:53:13 2000
diff -u --recursive --new-file v2.4.0-test8/linux/include/asm-sh/atomic.h linux/include/asm-sh/atomic.h
@@ -7,13 +7,7 @@
*
*/
-#include <linux/config.h>
-
-#ifdef CONFIG_SMP
typedef struct { volatile int counter; } atomic_t;
-#else
-typedef struct { int counter; } atomic_t;
-#endif
#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
@@ -23,19 +17,12 @@
#include <asm/system.h>
/*
- * Make sure gcc doesn't try to be clever and move things around
- * on us. We need to use _exactly_ the address the user gave us,
- * not some alias that contains the same information.
- */
-#define __atomic_fool_gcc(x) (*(volatile struct { int a[100]; } *)x)
-
-/*
* To get proper branch prediction for the main line, we must branch
* forward to code at the end of this object's .text section, then
* branch back to restart the operation.
*/
-extern __inline__ void atomic_add(int i, atomic_t * v)
+static __inline__ void atomic_add(int i, atomic_t * v)
{
unsigned long flags;
@@ -44,7 +31,7 @@
restore_flags(flags);
}
-extern __inline__ void atomic_sub(int i, atomic_t *v)
+static __inline__ void atomic_sub(int i, atomic_t *v)
{
unsigned long flags;
@@ -53,7 +40,7 @@
restore_flags(flags);
}
-extern __inline__ int atomic_add_return(int i, atomic_t * v)
+static __inline__ int atomic_add_return(int i, atomic_t * v)
{
unsigned long temp, flags;
@@ -66,7 +53,7 @@
return temp;
}
-extern __inline__ int atomic_sub_return(int i, atomic_t * v)
+static __inline__ int atomic_sub_return(int i, atomic_t * v)
{
unsigned long temp, flags;
@@ -88,7 +75,7 @@
#define atomic_inc(v) atomic_add(1,(v))
#define atomic_dec(v) atomic_sub(1,(v))
-extern __inline__ void atomic_clear_mask(unsigned int mask, atomic_t *v)
+static __inline__ void atomic_clear_mask(unsigned int mask, atomic_t *v)
{
unsigned long flags;
@@ -97,7 +84,7 @@
restore_flags(flags);
}
-extern __inline__ void atomic_set_mask(unsigned int mask, atomic_t *v)
+static __inline__ void atomic_set_mask(unsigned int mask, atomic_t *v)
{
unsigned long flags;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)