We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e245252 commit 852c7c8Copy full SHA for 852c7c8
src/shims/unix/linux/eventfd.rs
@@ -10,8 +10,6 @@ use crate::{concurrency::VClock, *};
10
11
use self::shims::unix::fd::FileDescriptor;
12
13
-// TODO: add comment on this
14
-// Size of u8 array to hold u64 value.
15
const U64_ARRAY_SIZE: usize = mem::size_of::<u64>();
16
17
/// Maximum value that the eventfd counter can hold.
@@ -113,7 +111,9 @@ impl FileDescription for Event {
113
111
match self.counter.checked_add(num) {
114
112
Some(new_count @ 0..=MAX_COUNTER) => {
115
// Synchronize with all prior `write` calls to this FD.
116
- self.clock.join(&ecx.release_clock().unwrap());
+ if let Some(clock) = &ecx.release_clock() {
+ self.clock.join(clock);
+ }
117
self.counter = new_count;
118
}
119
None | Some(u64::MAX) => {
0 commit comments