summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/include/lock.h3
-rw-r--r--sys/arch/amd64/include/lock.h6
-rw-r--r--sys/arch/hppa/include/lock.h6
-rw-r--r--sys/arch/i386/include/lock.h3
-rw-r--r--sys/arch/m88k/include/lock.h6
-rw-r--r--sys/arch/mips64/include/lock.h3
-rw-r--r--sys/arch/powerpc/include/lock.h3
-rw-r--r--sys/arch/sparc64/include/lock.h6
8 files changed, 8 insertions, 28 deletions
diff --git a/sys/arch/alpha/include/lock.h b/sys/arch/alpha/include/lock.h
index 2d24ca142f8..e40761990d2 100644
--- a/sys/arch/alpha/include/lock.h
+++ b/sys/arch/alpha/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.7 2014/03/29 18:09:28 guenther Exp $ */
+/* $OpenBSD: lock.h,v 1.8 2015/02/11 00:14:11 dlg Exp $ */
/* $NetBSD: lock.h,v 1.16 2001/12/17 23:34:57 thorpej Exp $ */
/*-
@@ -61,7 +61,6 @@ do { \
} while (0)
#endif /* MULTIPROCESSOR */
-#define rw_cas __cpu_cas
static inline int
__cpu_cas(volatile unsigned long *addr, unsigned long old, unsigned long new)
{
diff --git a/sys/arch/amd64/include/lock.h b/sys/arch/amd64/include/lock.h
index 6fe29ddc75f..40bee59167b 100644
--- a/sys/arch/amd64/include/lock.h
+++ b/sys/arch/amd64/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.9 2014/03/29 18:09:28 guenther Exp $ */
+/* $OpenBSD: lock.h,v 1.10 2015/02/11 00:14:11 dlg Exp $ */
/* $NetBSD: lock.h,v 1.1.2.2 2000/05/03 14:40:55 sommerfeld Exp $ */
/*-
@@ -48,8 +48,4 @@
#define __lockbarrier() __asm volatile("": : :"memory")
#define SPINLOCK_SPIN_HOOK __asm volatile("pause": : :"memory");
-#include <machine/atomic.h>
-
-#define rw_cas(p, o, n) (atomic_cas_ulong(p, o, n) != o)
-
#endif /* _MACHINE_LOCK_H_ */
diff --git a/sys/arch/hppa/include/lock.h b/sys/arch/hppa/include/lock.h
index f0766ae614a..cb7e1edae89 100644
--- a/sys/arch/hppa/include/lock.h
+++ b/sys/arch/hppa/include/lock.h
@@ -1,12 +1,8 @@
-/* $OpenBSD: lock.h,v 1.8 2014/09/22 12:12:23 dlg Exp $ */
+/* $OpenBSD: lock.h,v 1.9 2015/02/11 00:14:11 dlg Exp $ */
/* public domain */
#ifndef _MACHINE_LOCK_H_
#define _MACHINE_LOCK_H_
-#include <machine/atomic.h>
-
-#define rw_cas(p, o, n) (atomic_cas_ulong(p, o, n) != o)
-
#endif /* _MACHINE_LOCK_H_ */
diff --git a/sys/arch/i386/include/lock.h b/sys/arch/i386/include/lock.h
index d1d39f704e5..63e616b0e26 100644
--- a/sys/arch/i386/include/lock.h
+++ b/sys/arch/i386/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.9 2014/03/29 18:09:29 guenther Exp $ */
+/* $OpenBSD: lock.h,v 1.10 2015/02/11 00:14:11 dlg Exp $ */
/* $NetBSD: lock.h,v 1.1.2.2 2000/05/03 14:40:55 sommerfeld Exp $ */
/*-
@@ -53,7 +53,6 @@
#ifdef _KERNEL
extern int rw_cas_486(volatile unsigned long *, unsigned long, unsigned long);
-#define rw_cas rw_cas_486
#endif
#endif /* _MACHINE_LOCK_H_ */
diff --git a/sys/arch/m88k/include/lock.h b/sys/arch/m88k/include/lock.h
index 2ad1c95d8bc..5b3e70745ef 100644
--- a/sys/arch/m88k/include/lock.h
+++ b/sys/arch/m88k/include/lock.h
@@ -1,6 +1,6 @@
#ifndef _M88K_LOCK_H_
#define _M88K_LOCK_H_
-/* $OpenBSD: lock.h,v 1.10 2014/07/15 16:28:11 miod Exp $ */
+/* $OpenBSD: lock.h,v 1.11 2015/02/11 00:14:11 dlg Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
@@ -74,8 +74,4 @@ __cpu_simple_unlock(__cpu_simple_lock_t *l)
*l = __SIMPLELOCK_UNLOCKED;
}
-#if defined(_KERNEL) && defined(MULTIPROCESSOR)
-#define rw_cas(p, o, n) (atomic_cas_ulong(p, o, n) != o)
-#endif
-
#endif /* _M88K_LOCK_H_ */
diff --git a/sys/arch/mips64/include/lock.h b/sys/arch/mips64/include/lock.h
index c19cd7362c5..ee927014ad7 100644
--- a/sys/arch/mips64/include/lock.h
+++ b/sys/arch/mips64/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.6 2014/09/30 06:51:58 jmatthew Exp $ */
+/* $OpenBSD: lock.h,v 1.7 2015/02/11 00:14:11 dlg Exp $ */
/* public domain */
@@ -7,7 +7,6 @@
#include <sys/atomic.h>
-#define rw_cas __cpu_cas
static __inline int
__cpu_cas(volatile unsigned long *addr, unsigned long old, unsigned long new)
{
diff --git a/sys/arch/powerpc/include/lock.h b/sys/arch/powerpc/include/lock.h
index 18f9bf6d88b..757cdedd343 100644
--- a/sys/arch/powerpc/include/lock.h
+++ b/sys/arch/powerpc/include/lock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.h,v 1.4 2013/05/21 20:05:30 tedu Exp $ */
+/* $OpenBSD: lock.h,v 1.5 2015/02/11 00:14:11 dlg Exp $ */
/* $NetBSD: lock.h,v 1.8 2005/12/28 19:09:29 perry Exp $ */
/*-
@@ -37,7 +37,6 @@
#ifndef _POWERPC_LOCK_H_
#define _POWERPC_LOCK_H_
-#define rw_cas __cpu_cas
static __inline int
__cpu_cas(volatile unsigned long *addr, unsigned long old, unsigned long new)
{
diff --git a/sys/arch/sparc64/include/lock.h b/sys/arch/sparc64/include/lock.h
index ac39aefdfa5..a34bb3d7be3 100644
--- a/sys/arch/sparc64/include/lock.h
+++ b/sys/arch/sparc64/include/lock.h
@@ -1,12 +1,8 @@
-/* $OpenBSD: lock.h,v 1.9 2014/01/30 00:51:13 dlg Exp $ */
+/* $OpenBSD: lock.h,v 1.10 2015/02/11 00:14:11 dlg Exp $ */
/* public domain */
#ifndef _MACHINE_LOCK_H_
#define _MACHINE_LOCK_H_
-#include <sys/atomic.h>
-
-#define rw_cas(p, o, n) (atomic_cas_ulong(p, o, n) != o)
-
#endif /* _MACHINE_LOCK_H_ */