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/i386/include | |
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/i386/include')
-rw-r--r-- | sys/arch/i386/include/lock.h | 3 |
1 files changed, 1 insertions, 2 deletions
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_ */ |