Add newlines at end of file + use replace.

add dangling thread variant of one of the benchmarks
This commit is contained in:
JCTyBlaidd 2020-11-02 13:08:09 +00:00
parent 2e75de5ac9
commit fe2e857cc3
9 changed files with 47 additions and 12 deletions

View File

@ -0,0 +1,7 @@
[package]
name = "mse"
version = "0.1.0"
authors = ["Ralf Jung <post@ralfj.de>"]
edition = "2018"
[dependencies]

File diff suppressed because one or more lines are too long

View File

@ -65,12 +65,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
fn read_immediate_racy(&self, op: MPlaceTy<'tcx, Tag>) -> InterpResult<'tcx, ImmTy<'tcx, Tag>> {
let this = self.eval_context_ref();
let data_race = &*this.memory.extra.data_race;
let old = data_race.multi_threaded.get();
data_race.multi_threaded.set(false);
let old = data_race.multi_threaded.replace(false);
let res = this.read_immediate(op.into());
data_race.multi_threaded.set(old);
res
}
@ -80,9 +79,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
) -> InterpResult<'tcx> {
let this = self.eval_context_mut();
let data_race = &*this.memory.extra.data_race;
let old = data_race.multi_threaded.get();
let old = data_race.multi_threaded.replace(false);
data_race.multi_threaded.set(false);
let imm = this.write_immediate(src, dest.into());
let data_race = &*this.memory.extra.data_race;
@ -1404,4 +1402,4 @@ mod tests {
"Invalid alt (>=):\n l: {:?}\n r: {:?}",l,r
);
}
}
}

View File

@ -24,4 +24,4 @@ pub fn main() {
j1.join().unwrap();
j2.join().unwrap();
}
}
}

View File

@ -40,4 +40,4 @@ pub fn main() {
j2.join().unwrap();
j3.join().unwrap();
}
}
}

View File

@ -44,4 +44,4 @@ pub fn main() {
j2.join().unwrap();
j3.join().unwrap();
}
}
}

View File

@ -41,4 +41,4 @@ pub fn main() {
j2.join().unwrap();
j3.join().unwrap();
}
}
}

View File

@ -24,4 +24,4 @@ pub fn main() {
j1.join().unwrap();
j2.join().unwrap();
}
}
}

View File

@ -119,4 +119,4 @@ pub fn main() {
test_multiple_reads();
test_rmw_no_block();
test_release_no_block();
}
}