Skip to content

Commit 35f4d24

Browse files
committed
Make condvar_table hash function bijective
1 parent eb53fa0 commit 35f4d24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/condvar_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fn entry_for_ptr(ptr: *const ()) -> u8 {
8181
let x_64 = ptr as u64;
8282
let x_32 = (x_64 >> 32) as u32 ^ x_64 as u32;
8383
let x_16 = (x_32 >> 16) as u16 ^ x_32 as u16;
84-
(x_16 >> 8) as u8 ^ (x_16 >> 2) as u8
84+
(x_16 >> 8) as u8 ^ x_16 as u8
8585
}
8686

8787
/// Holds metadata that gets written while locking.

0 commit comments

Comments
 (0)