diff options
author | 2015-02-10 10:04:27 +0000 | |
---|---|---|
committer | 2015-02-10 10:04:27 +0000 | |
commit | d215fe4c08f2fab6dc7eeae46633900349b0a970 (patch) | |
tree | f1a7233204437ac2af0d7b0425eb74839b5a00d1 | |
parent | increase min address to page size for all remaining min == 0 systems. (diff) | |
download | wireguard-openbsd-d215fe4c08f2fab6dc7eeae46633900349b0a970.tar.xz wireguard-openbsd-d215fe4c08f2fab6dc7eeae46633900349b0a970.zip |
remove #ifndef handling of __HAVE_MD_RWLOCK. it's never set, and with a
reasonable compiler it isnt necessary.
ok miod@ art@
-rw-r--r-- | sys/kern/kern_rwlock.c | 8 | ||||
-rw-r--r-- | sys/sys/rwlock.h | 9 |
2 files changed, 3 insertions, 14 deletions
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c index bf90a4428be..f50cf65a033 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_rwlock.c,v 1.23 2014/09/01 03:37:10 guenther Exp $ */ +/* $OpenBSD: kern_rwlock.c,v 1.24 2015/02/10 10:04:27 dlg Exp $ */ /* * Copyright (c) 2002, 2003 Artur Grabowski <art@openbsd.org> @@ -74,10 +74,6 @@ static const struct rwlock_op { }, }; -#ifndef __HAVE_MD_RWLOCK -/* - * Simple cases that should be in MD code and atomic. - */ void rw_enter_read(struct rwlock *rwl) { @@ -140,8 +136,6 @@ rw_cas(volatile unsigned long *p, unsigned long o, unsigned long n) } #endif -#endif - #ifdef DIAGNOSTIC /* * Put the diagnostic functions here to keep the main code free diff --git a/sys/sys/rwlock.h b/sys/sys/rwlock.h index 9103a914410..594463ea0f3 100644 --- a/sys/sys/rwlock.h +++ b/sys/sys/rwlock.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rwlock.h,v 1.16 2014/07/09 13:32:00 guenther Exp $ */ +/* $OpenBSD: rwlock.h,v 1.17 2015/02/10 10:04:27 dlg Exp $ */ /* * Copyright (c) 2002 Artur Grabowski <art@openbsd.org> * @@ -30,10 +30,7 @@ * When write locked, the upper bits contain the struct proc * pointer to * the writer, otherwise they count the number of readers. * - * We provide a simple machine independent implementation that can be - * optimized by machine dependent code when __HAVE_MD_RWLOCK is defined. - * - * MD code that defines __HAVE_MD_RWLOCK and implement four functions: + * We provide a simple machine independent implementation: * * void rw_enter_read(struct rwlock *) * atomically test for RWLOCK_WRLOCK and if not set, increment the lock @@ -52,8 +49,6 @@ * void rw_exit_write(struct rwlock *); * atomically swap the contents of the lock with 0 and if RWLOCK_WAIT was * set, call rw_exit_waiters with the old contents of the lock. - * - * (XXX - the rest of the API for this is not invented yet). */ #ifndef SYS_RWLOCK_H |