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

Function sve_vector_length_configuration

src/thread/prctl.rs:790–796  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

788/// [`prctl(PR_SVE_GET_VL,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html
789#[inline]
790pub fn sve_vector_length_configuration() -> io::Result<SVEVectorLengthConfig> {
791 let bits = unsafe { prctl_1arg(PR_SVE_GET_VL)? } as c_uint;
792 Ok(SVEVectorLengthConfig {
793 vector_length_in_bytes: bits & PR_SVE_VL_LEN_MASK,
794 vector_length_inherited_across_execve: (bits & PR_SVE_VL_INHERIT) != 0,
795 })
796}
797
798const PR_SVE_SET_VL: c_int = 50;
799

Callers

nothing calls this directly

Calls 1

prctl_1argFunction · 0.85

Tested by

no test coverage detected