CI problem fixed

This commit is contained in:
Per Lindgren 2021-10-27 13:45:37 +02:00 committed by Henrik Tjäder
parent 3a24fd8bd1
commit fde331fdf9
4 changed files with 3 additions and 11 deletions

View file

@ -1,5 +1,3 @@
foo: a = 1, b = 2
baz
still in foo::lock
bar: a = 3
still in foo

View file

@ -1,5 +1,3 @@
foo: a = 1, b = 2
baz
still in foo::lock
bar: a = 3
still in foo

View file

@ -35,9 +35,7 @@ mod app {
*s.a += 1;
bar::spawn().unwrap();
baz::spawn().unwrap();
hprintln!("still in foo::lock").ok();
});
hprintln!("still in foo").ok();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}

View file

@ -35,19 +35,17 @@ mod app {
**a += 1;
bar::spawn().unwrap();
baz::spawn().unwrap();
hprintln!("still in foo::lock").ok();
});
hprintln!("still in foo").ok();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
#[task(priority = 2, shared = [a])]
fn bar(mut c: bar::Context) {
// the higher priority task does still need a critical section
let a = c.shared.lock(|s| {
*s.a += 1;
let a = c.shared.lock(|bar::Shared { a }| {
**a += 1;
// *s.b += 1; `b` not accessible
*s.a
**a
});
hprintln!("bar: a = {}", a).unwrap();