summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2006-06-05 05:15:23 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2006-06-05 05:15:23 +0000
commit0fb0231ec64d2e0c886666a58f7539ee10106fb1 (patch)
tree4bc865686fd6d1ea665ca088042468f6505d5f57
parentff8ab090b6c530df2c1c739f0dac05cc58c0e0dd (diff)
fix really stupid botch i made in last commit. RW_WRITE and RW_READ are
array indices not flags, and can't be renumbered trivially. noticed by sturm
-rw-r--r--sys/sys/rwlock.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/rwlock.h b/sys/sys/rwlock.h
index fd47d18acd6..cb89d50038a 100644
--- a/sys/sys/rwlock.h
+++ b/sys/sys/rwlock.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rwlock.h,v 1.7 2006/06/02 05:02:34 tedu Exp $ */
+/* $OpenBSD: rwlock.h,v 1.8 2006/06/05 05:15:22 tedu Exp $ */
/*
* Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
* All rights reserved.
@@ -97,9 +97,9 @@ void rw_exit_write(struct rwlock *);
int rw_enter(struct rwlock *, int);
void rw_exit(struct rwlock *);
-#define RW_WRITE 0x01UL /* exclusive lock */
-#define RW_READ 0x02UL /* shared lock */
-#define RW_OPMASK 0x03UL
+#define RW_WRITE 0x00UL /* exclusive lock */
+#define RW_READ 0x01UL /* shared lock */
+#define RW_OPMASK 0x01UL
#define RW_INTR 0x10UL /* interruptible sleep */
#define RW_SLEEPFAIL 0x20UL /* fail if we slept for the lock */
#define RW_NOSLEEP 0x40UL /* don't wait for the lock */