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

Function fd_set_num_elements_for_bitvector

src/event/select.rs:254–258  ·  view source on GitHub ↗
(nfds: RawFd)

Source from the content-addressed store, hash-verified

252#[cfg(not(any(windows, target_os = "wasi")))]
253#[inline]
254pub(crate) fn fd_set_num_elements_for_bitvector(nfds: RawFd) -> usize {
255 // Allocate space for a dense bitvector for `nfds` bits.
256 let nfds = nfds as usize;
257 div_ceil(nfds, BITS)
258}
259
260fn div_ceil(lhs: usize, rhs: usize) -> usize {
261 let d = lhs / rhs;

Callers 3

selectFunction · 0.85
selectFunction · 0.85
fd_set_num_elementsFunction · 0.85

Calls 1

div_ceilFunction · 0.85

Tested by

no test coverage detected