MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / notify

Method notify

nodedb/src/data/eventfd.rs:96–107  ·  view source on GitHub ↗

Signal the Data Plane core to wake up.

(&self)

Source from the content-addressed store, hash-verified

94impl EventFdNotifier {
95 /// Signal the Data Plane core to wake up.
96 pub fn notify(&self) {
97 let val: u64 = 1;
98 // SAFETY: writing 8 bytes to an eventfd is the documented API.
99 // This is atomic and thread-safe per the Linux man page.
100 unsafe {
101 libc::write(
102 self.fd,
103 &val as *const u64 as *const libc::c_void,
104 std::mem::size_of::<u64>(),
105 );
106 }
107 }
108}
109
110#[cfg(test)]

Callers 7

dispatchMethod · 0.45
dispatch_to_coreMethod · 0.45
create_and_signalFunction · 0.45
poll_wait_signaledFunction · 0.45

Calls 1

writeFunction · 0.50

Tested by 5

create_and_signalFunction · 0.36
poll_wait_signaledFunction · 0.36