MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / fd_set_num_elements_for_fd_array

Function fd_set_num_elements_for_fd_array

src/event/select.rs:229–235  ·  view source on GitHub ↗
(set_count: usize)

Source from the content-addressed store, hash-verified

227#[cfg(any(windows, target_os = "wasi"))]
228#[inline]
229pub(crate) fn fd_set_num_elements_for_fd_array(set_count: usize) -> usize {
230 // Ensure that we always have a big enough set to dereference an `FD_SET`.
231 core::cmp::max(
232 fd_set_num_elements_for_fd_array_raw(set_count),
233 div_ceil(size_of::<FD_SET>(), size_of::<FdSetElement>()),
234 )
235}
236
237/// Compute the raw `fd_set_num_elements` value, before ensuring the value is
238/// big enough to dereference an `FD_SET`.

Callers 2

selectFunction · 0.85
fd_set_num_elementsFunction · 0.85

Calls 2

div_ceilFunction · 0.85

Tested by

no test coverage detected