diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2015-02-11 00:14:12 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2015-02-11 00:14:12 +0000 |
commit | c4427bcd781765e2f91f6109bbd3267e7d9c4232 (patch) | |
tree | 3d165a2943dc27e75242e5c202c9cb43389d9218 /sys/arch/powerpc/include/lock.h | |
parent | 327e76719bad93f8260eacba21e3bf58cfe1f944 (diff) |
make the rwlock implementation MI.
each arch used to have to provide an rw_cas operation, but now we
have the rwlock code build its own version. on smp machines it uses
atomic_cas_ulong. on uniproc machines it avoids interlocked
instructions by using straight loads and stores. this is safe because
rwlocks are only used from process context and processes are currently
not preemptible in our kernel. so alpha/ppc/etc might get a benefit.
ok miod@ kettenis@ deraadt@
Diffstat (limited to 'sys/arch/powerpc/include/lock.h')
-rw-r--r-- | sys/arch/powerpc/include/lock.h | 3 |
1 files changed, 1 insertions, 2 deletions
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) { |