1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! One-time caching of runtime CPU feature probes.
//!
//! `is_x86_feature_detected!` is cheap but not free, and the kernels that
//! consult it sit on per-sample hot paths. Each dispatch site keeps one
//! [`FeatureCache`] in a `static` and asks it once; the answer cannot change
//! while the process runs, so a relaxed atomic is enough.
use ;
const UNKNOWN: u8 = 0;
const ON: u8 = 1;
const OFF: u8 = 2;
/// Remembers the result of a boolean probe after its first evaluation.
pub ;