Rust nightly update - cache_side_channel
This commit is contained in:
parent
e4c838e8b0
commit
26538fe913
@ -7,4 +7,4 @@ edition = "2018"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
nix = "0.18.0"
|
||||
nix = "0.20.0"
|
||||
|
@ -41,10 +41,10 @@ pub fn restore_affinity(cpu_set: &CpuSet) {
|
||||
}
|
||||
|
||||
#[must_use = "This result must be used to restore affinity"]
|
||||
pub fn set_affinity(cpu_set: &CpuSet) -> CpuSet {
|
||||
let old = sched_getaffinity(Pid::from_raw(0)).unwrap();
|
||||
sched_setaffinity(Pid::from_raw(0), &cpu_set).unwrap();
|
||||
old
|
||||
pub fn set_affinity(cpu_set: &CpuSet) -> Result<CpuSet, nix::Error> {
|
||||
let old = sched_getaffinity(Pid::from_raw(0))?;
|
||||
sched_setaffinity(Pid::from_raw(0), &cpu_set)?;
|
||||
Ok(old)
|
||||
}
|
||||
|
||||
pub trait SingleAddrCacheSideChannel: CoreSpec + Debug {
|
||||
|
Loading…
Reference in New Issue
Block a user