diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/alpha/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/amd64/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/arm/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/hppa/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/hppa64/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/i386/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/m68k/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/m88k/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/mips64/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/powerpc/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/sh/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/sparc/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/sparc64/include/spinlock.h | 12 | ||||
-rw-r--r-- | sys/arch/vax/include/spinlock.h | 12 |
14 files changed, 112 insertions, 56 deletions
diff --git a/sys/arch/alpha/include/spinlock.h b/sys/arch/alpha/include/spinlock.h index 463ac57ddfb..688d5837e12 100644 --- a/sys/arch/alpha/include/spinlock.h +++ b/sys/arch/alpha/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.1 1999/01/08 08:25:33 d Exp $ */ +/* $OpenBSD: spinlock.h,v 1.2 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0) -#define _SPINLOCK_LOCKED (1) -typedef int _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0) +#define _ATOMIC_LOCK_LOCKED (1) +typedef int _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/amd64/include/spinlock.h b/sys/arch/amd64/include/spinlock.h index be9e806ff5e..688d5837e12 100644 --- a/sys/arch/amd64/include/spinlock.h +++ b/sys/arch/amd64/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.1 2004/01/28 01:39:39 mickey Exp $ */ +/* $OpenBSD: spinlock.h,v 1.2 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0) -#define _SPINLOCK_LOCKED (1) -typedef int _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0) +#define _ATOMIC_LOCK_LOCKED (1) +typedef int _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/arm/include/spinlock.h b/sys/arch/arm/include/spinlock.h index 5b68222836d..e8a52d59f17 100644 --- a/sys/arch/arm/include/spinlock.h +++ b/sys/arch/arm/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */ +/* $OpenBSD: spinlock.h,v 1.2 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _ARM_SPINLOCK_H_ #define _ARM_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0) -#define _SPINLOCK_LOCKED (1) -typedef int _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0) +#define _ATOMIC_LOCK_LOCKED (1) +typedef int _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/hppa/include/spinlock.h b/sys/arch/hppa/include/spinlock.h index a53dc35aa62..6ce31ca3e95 100644 --- a/sys/arch/hppa/include/spinlock.h +++ b/sys/arch/hppa/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.3 2011/11/14 14:29:53 deraadt Exp $ */ +/* $OpenBSD: spinlock.h,v 1.4 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (1) -#define _SPINLOCK_LOCKED (0) -typedef long _spinlock_lock_t __attribute__((__aligned__(16))); +#define _ATOMIC_LOCK_UNLOCKED (1) +#define _ATOMIC_LOCK_LOCKED (0) +typedef long _atomic_lock_t __attribute__((__aligned__(16))); + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/hppa64/include/spinlock.h b/sys/arch/hppa64/include/spinlock.h index 613d06300df..24c3d89ff02 100644 --- a/sys/arch/hppa64/include/spinlock.h +++ b/sys/arch/hppa64/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.2 2011/11/14 14:29:57 deraadt Exp $ */ +/* $OpenBSD: spinlock.h,v 1.3 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (1) -#define _SPINLOCK_LOCKED (0) -typedef long _spinlock_lock_t __attribute__((__aligned__(16))); +#define _ATOMIC_LOCK_UNLOCKED (1) +#define _ATOMIC_LOCK_LOCKED (0) +typedef long _atomic_lock_t __attribute__((__aligned__(16))); + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/i386/include/spinlock.h b/sys/arch/i386/include/spinlock.h index a245c351fd4..688d5837e12 100644 --- a/sys/arch/i386/include/spinlock.h +++ b/sys/arch/i386/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.1 1999/01/08 08:25:34 d Exp $ */ +/* $OpenBSD: spinlock.h,v 1.2 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0) -#define _SPINLOCK_LOCKED (1) -typedef int _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0) +#define _ATOMIC_LOCK_LOCKED (1) +typedef int _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/m68k/include/spinlock.h b/sys/arch/m68k/include/spinlock.h index 44d38732d2d..30ba8fbdb70 100644 --- a/sys/arch/m68k/include/spinlock.h +++ b/sys/arch/m68k/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.2 1999/01/26 23:39:28 d Exp $ */ +/* $OpenBSD: spinlock.h,v 1.3 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _M68K_SPINLOCK_H_ #define _M68K_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0) -#define _SPINLOCK_LOCKED (1) -typedef int _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0) +#define _ATOMIC_LOCK_LOCKED (1) +typedef int _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/m88k/include/spinlock.h b/sys/arch/m88k/include/spinlock.h index cce8d02ec4c..c4dfcedb5ba 100644 --- a/sys/arch/m88k/include/spinlock.h +++ b/sys/arch/m88k/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.1 2004/04/26 12:34:05 miod Exp $ */ +/* $OpenBSD: spinlock.h,v 1.2 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _M88K_SPINLOCK_H_ #define _M88K_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0) -#define _SPINLOCK_LOCKED (1) -typedef int _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0) +#define _ATOMIC_LOCK_LOCKED (1) +typedef int _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/mips64/include/spinlock.h b/sys/arch/mips64/include/spinlock.h index 87e9be5a768..766e8fd1523 100644 --- a/sys/arch/mips64/include/spinlock.h +++ b/sys/arch/mips64/include/spinlock.h @@ -1,11 +1,15 @@ -/* $OpenBSD: spinlock.h,v 1.3 2011/03/23 16:54:36 pirofti Exp $ */ +/* $OpenBSD: spinlock.h,v 1.4 2013/06/01 20:47:40 tedu Exp $ */ /* Public domain */ #ifndef _MIPS64_SPINLOCK_H_ #define _MIPS64_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0) -#define _SPINLOCK_LOCKED (1) -typedef int _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0) +#define _ATOMIC_LOCK_LOCKED (1) +typedef int _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif /* !_MIPS64_SPINLOCK_H_ */ diff --git a/sys/arch/powerpc/include/spinlock.h b/sys/arch/powerpc/include/spinlock.h index 9058f266343..95a1271fd62 100644 --- a/sys/arch/powerpc/include/spinlock.h +++ b/sys/arch/powerpc/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.2 2001/09/01 15:49:05 drahn Exp $ */ +/* $OpenBSD: spinlock.h,v 1.3 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _POWERPC_SPINLOCK_H_ #define _POWERPC_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0) -#define _SPINLOCK_LOCKED (1) -typedef int _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0) +#define _ATOMIC_LOCK_LOCKED (1) +typedef int _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/sh/include/spinlock.h b/sys/arch/sh/include/spinlock.h index 5d8516aab3e..f35a7effd9d 100644 --- a/sys/arch/sh/include/spinlock.h +++ b/sys/arch/sh/include/spinlock.h @@ -1,4 +1,4 @@ -/* $OpenBSD: spinlock.h,v 1.3 2008/06/26 05:42:13 ray Exp $ */ +/* $OpenBSD: spinlock.h,v 1.4 2013/06/01 20:47:40 tedu Exp $ */ /* $NetBSD: lock.h,v 1.10 2006/01/03 01:29:46 uwe Exp $ */ /*- @@ -37,9 +37,13 @@ #ifndef _SH_SPINLOCK_H_ #define _SH_SPINLOCK_H_ -typedef u_int8_t _spinlock_lock_t; +typedef u_int8_t _atomic_lock_t; -#define _SPINLOCK_LOCKED 0x80 -#define _SPINLOCK_UNLOCKED 0x00 +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif + +#define _ATOMIC_LOCK_LOCKED 0x80 +#define _ATOMIC_LOCK_UNLOCKED 0x00 #endif /* !_SH_SPINLOCK_H_ */ diff --git a/sys/arch/sparc/include/spinlock.h b/sys/arch/sparc/include/spinlock.h index 0a4519f2db9..432d8459edc 100644 --- a/sys/arch/sparc/include/spinlock.h +++ b/sys/arch/sparc/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.2 1999/02/07 23:50:59 d Exp $ */ +/* $OpenBSD: spinlock.h,v 1.3 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0x00) -#define _SPINLOCK_LOCKED (0xFF) -typedef unsigned char _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0x00) +#define _ATOMIC_LOCK_LOCKED (0xFF) +typedef unsigned char _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/sparc64/include/spinlock.h b/sys/arch/sparc64/include/spinlock.h index e237ff88803..89a19f128d0 100644 --- a/sys/arch/sparc64/include/spinlock.h +++ b/sys/arch/sparc64/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.1 2001/09/10 20:00:14 jason Exp $ */ +/* $OpenBSD: spinlock.h,v 1.2 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0x00) -#define _SPINLOCK_LOCKED (0xFF) -typedef unsigned char _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0x00) +#define _ATOMIC_LOCK_LOCKED (0xFF) +typedef unsigned char _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif diff --git a/sys/arch/vax/include/spinlock.h b/sys/arch/vax/include/spinlock.h index 7c38641bc01..b050c25e885 100644 --- a/sys/arch/vax/include/spinlock.h +++ b/sys/arch/vax/include/spinlock.h @@ -1,10 +1,14 @@ -/* $OpenBSD: spinlock.h,v 1.2 2002/11/01 20:15:03 miod Exp $ */ +/* $OpenBSD: spinlock.h,v 1.3 2013/06/01 20:47:40 tedu Exp $ */ #ifndef _MACHINE_SPINLOCK_H_ #define _MACHINE_SPINLOCK_H_ -#define _SPINLOCK_UNLOCKED (0) -#define _SPINLOCK_LOCKED (1) -typedef int _spinlock_lock_t; +#define _ATOMIC_LOCK_UNLOCKED (0) +#define _ATOMIC_LOCK_LOCKED (1) +typedef int _atomic_lock_t; + +#ifndef _KERNEL +int _atomic_lock(volatile _atomic_lock_t *); +#endif #endif |