aboutsummaryrefslogtreecommitdiff
path: root/examples/message.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/message.rs')
-rw-r--r--examples/message.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/examples/message.rs b/examples/message.rs
index 722e73a7..7318d4b7 100644
--- a/examples/message.rs
+++ b/examples/message.rs
@@ -11,21 +11,25 @@ use panic_semihosting as _;
mod app {
use cortex_m_semihosting::{debug, hprintln};
+ #[shared]
+ struct Shared {}
+
+ #[local]
+ struct Local {}
+
#[init]
- fn init(_: init::Context) -> (init::LateResources, init::Monotonics) {
+ fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
foo::spawn(/* no message */).unwrap();
- (init::LateResources {}, init::Monotonics())
+ (Shared {}, Local {}, init::Monotonics())
}
- #[task]
- fn foo(_: foo::Context) {
- static mut COUNT: u32 = 0;
-
+ #[task(local = [count: u32 = 0])]
+ fn foo(cx: foo::Context) {
hprintln!("foo").unwrap();
- bar::spawn(*COUNT).unwrap();
- *COUNT += 1;
+ bar::spawn(*cx.local.count).unwrap();
+ *cx.local.count += 1;
}
#[task]
value='jarred/profiled-call'>jarred/profiled-call Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/sqlite/lazy_sqlite3.h (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2023-10-12TweaksGravatar Colin McDonnell 1-2/+2
2023-10-12Fix structGravatar Colin McDonnell 1-1/+1
2023-10-12Clean up, implement warn_on_unrecognized_flagGravatar Colin McDonnell 4-26/+40
2023-10-12WIPGravatar Colin McDonnell 4-77/+14
2023-10-12WIPGravatar Colin McDonnell 5-347/+353
2023-10-12WIPGravatar Colin McDonnell 5-209/+446
2023-10-12WIPGravatar Colin McDonnell 2-24/+106
2023-10-12Improve helptextGravatar Colin McDonnell 1-55/+83
2023-10-12WIPGravatar Colin McDonnell 3-49/+147
2023-10-12WIPGravatar Colin McDonnell 2-0/+19
2023-10-12fix install testGravatar Dylan Conway 2-6/+8
2023-10-12fix editing package json when adding github dependency (#6432)Gravatar Dylan Conway 5-14/+146
2023-10-12Update installation.mdGravatar Colin McDonnell 1-8/+14
2023-10-12Update installation.mdGravatar Colin McDonnell 1-3/+3
2023-10-12fix(install): re-evaluate overrides when removedbun-v1.0.6Gravatar dave caruso 3-3/+45
2023-10-12chore: add missing ending quote (#6436)Gravatar Luna 1-1/+1
2023-10-12feat(install): support npm overrides/yarn resolutions, one level deep only (#...Gravatar dave caruso 7-31/+640
2023-10-11fix #6416 (#6430)Gravatar Dylan Conway 2-1/+132
2023-10-11Bump WebKitGravatar Jarred Sumner 9-29/+29
2023-10-11Bump!Gravatar Jarred Sumner 1-1/+1
2023-10-11Update JSCUSocketsLoopIntegration.cppGravatar Dylan Conway 1-2/+2
2023-10-11Update installation.mdGravatar Colin McDonnell 1-10/+7