summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2015-02-10 10:04:28 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2015-02-10 10:04:28 +0000
commitf95f7e1fcba115d4bd0fa514cc49f4a4acf60c98 (patch)
treeb50c7557d6976b5046861f1592ea25bd3ac39360
parentb8e3ef2e3f3091afe32c7e1ce5769da09e7c6d1b (diff)
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.c8
-rw-r--r--sys/sys/rwlock.h9
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