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

Method contains

src/kernel_sigset.rs:82–87  ·  view source on GitHub ↗

Test whether a given signal is present.

(&self, sig: Signal)

Source from the content-addressed store, hash-verified

80
81 /// Test whether a given signal is present.
82 pub fn contains(&self, sig: Signal) -> bool {
83 let sigs_per_elt = core::mem::size_of_val(&self.0.sig[0]) * 8;
84
85 let raw = (sig.as_raw().wrapping_sub(1)) as usize;
86 (self.0.sig[raw / sigs_per_elt] & (1 << (raw % sigs_per_elt))) != 0
87 }
88}
89
90impl Default for KernelSigSet {

Callers 15

mainFunction · 0.80
fmtMethod · 0.80
openFunction · 0.80
openatFunction · 0.80
unlinkatFunction · 0.80
utimensatFunction · 0.80
oflags_bitsFunction · 0.80
is_in_rangeMethod · 0.80
get_shm_nameFunction · 0.80
from_io_errorMethod · 0.80
name_to_indexFunction · 0.80
openat2Function · 0.80

Calls 1

as_rawMethod · 0.45

Tested by 9

test_socketopts_ip_mtuFunction · 0.64
test_socketopts_ipv6_mtuFunction · 0.64
test_sockopts_txtimeFunction · 0.64
test_v4_txtimeFunction · 0.64
test_v6_txtimeFunction · 0.64