diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2017-02-15 23:33:14 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2017-02-15 23:33:14 +0000 |
commit | 1085c4fa53644092f7bcf1d195c3090b785da4d0 (patch) | |
tree | bdb2c5561f06d6be83cb1a4ae5db58e2b21e54db /sys/sys/rwlock.h | |
parent | 5625fe92467ac884efd681949d304d5d7663b6d7 (diff) | |
download | src-1085c4fa53644092f7bcf1d195c3090b785da4d0.tar.gz src-1085c4fa53644092f7bcf1d195c3090b785da4d0.zip |
rwlock: tidy up r313392
While a new bit was added and thread alignment got shifted to accomodate it,
RW_READERS_SHIFT was not modified accordingly and clashed with the new flag.
This was surprisingly harmless. If the lock was taken for writing, other flags
were tested. If the lock was taken for reading, it would correctly work for
readers > 1 and this was the only relevant test performed.
Notes
Notes:
svn path=/head/; revision=313784
Diffstat (limited to 'sys/sys/rwlock.h')
-rw-r--r-- | sys/sys/rwlock.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/rwlock.h b/sys/sys/rwlock.h index 6e4d0696faf5..aa4b0cc2ab76 100644 --- a/sys/sys/rwlock.h +++ b/sys/sys/rwlock.h @@ -65,7 +65,7 @@ #define RW_LOCK_WAITERS (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS) #define RW_OWNER(x) ((x) & ~RW_LOCK_FLAGMASK) -#define RW_READERS_SHIFT 4 +#define RW_READERS_SHIFT 5 #define RW_READERS(x) (RW_OWNER((x)) >> RW_READERS_SHIFT) #define RW_READERS_LOCK(x) ((x) << RW_READERS_SHIFT | RW_LOCK_READ) #define RW_ONE_READER (1 << RW_READERS_SHIFT) |