mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-29 15:04:32 +01:00
CI problem fixed
This commit is contained in:
parent
3a24fd8bd1
commit
fde331fdf9
4 changed files with 3 additions and 11 deletions
|
@ -1,5 +1,3 @@
|
||||||
foo: a = 1, b = 2
|
foo: a = 1, b = 2
|
||||||
baz
|
baz
|
||||||
still in foo::lock
|
|
||||||
bar: a = 3
|
bar: a = 3
|
||||||
still in foo
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
foo: a = 1, b = 2
|
foo: a = 1, b = 2
|
||||||
baz
|
baz
|
||||||
still in foo::lock
|
|
||||||
bar: a = 3
|
bar: a = 3
|
||||||
still in foo
|
|
|
@ -35,9 +35,7 @@ mod app {
|
||||||
*s.a += 1;
|
*s.a += 1;
|
||||||
bar::spawn().unwrap();
|
bar::spawn().unwrap();
|
||||||
baz::spawn().unwrap();
|
baz::spawn().unwrap();
|
||||||
hprintln!("still in foo::lock").ok();
|
|
||||||
});
|
});
|
||||||
hprintln!("still in foo").ok();
|
|
||||||
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
|
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,19 +35,17 @@ mod app {
|
||||||
**a += 1;
|
**a += 1;
|
||||||
bar::spawn().unwrap();
|
bar::spawn().unwrap();
|
||||||
baz::spawn().unwrap();
|
baz::spawn().unwrap();
|
||||||
hprintln!("still in foo::lock").ok();
|
|
||||||
});
|
});
|
||||||
hprintln!("still in foo").ok();
|
|
||||||
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
|
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
|
||||||
}
|
}
|
||||||
|
|
||||||
#[task(priority = 2, shared = [a])]
|
#[task(priority = 2, shared = [a])]
|
||||||
fn bar(mut c: bar::Context) {
|
fn bar(mut c: bar::Context) {
|
||||||
// the higher priority task does still need a critical section
|
// the higher priority task does still need a critical section
|
||||||
let a = c.shared.lock(|s| {
|
let a = c.shared.lock(|bar::Shared { a }| {
|
||||||
*s.a += 1;
|
**a += 1;
|
||||||
// *s.b += 1; `b` not accessible
|
// *s.b += 1; `b` not accessible
|
||||||
*s.a
|
**a
|
||||||
});
|
});
|
||||||
|
|
||||||
hprintln!("bar: a = {}", a).unwrap();
|
hprintln!("bar: a = {}", a).unwrap();
|
||||||
|
|
Loading…
Reference in a new issue