(set_count: usize)
| 227 | #[cfg(any(windows, target_os = "wasi"))] |
| 228 | #[inline] |
| 229 | pub(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`. |
no test coverage detected