Skip to main content

splinter_event_bus_wait

Function splinter_event_bus_wait 

Source
pub unsafe extern "C" fn splinter_event_bus_wait(
    fd: c_int,
    timeout_ms: u64,
) -> c_int
Expand description

@brief Block until the global epoch changes or the timeout expires.

Uses poll(2) + read(2) on the fd returned by splinter_event_bus_open(). On return, the eventfd counter has been drained; the caller should call splinter_event_bus_get_dirty() to find which slots changed.

@param fd The fd returned by splinter_event_bus_open(). @param timeout_ms Maximum wait time in milliseconds; 0 = non-blocking, UINT64_MAX = wait forever. @return 0 if a change was detected, -1 on timeout or error.