From 5e92715d8cfce6dd91168ece7ce07502eda3145e Mon Sep 17 00:00:00 2001 From: mriise Date: Tue, 20 Jul 2021 01:13:24 -0700 Subject: [PATCH] fix pool example --- examples/pool.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/pool.rs b/examples/pool.rs index 63be899e8c..7c61dfba9f 100644 --- a/examples/pool.rs +++ b/examples/pool.rs @@ -42,14 +42,14 @@ mod app { #[task(binds = I2C0, priority = 2)] fn i2c0(_: i2c0::Context) { - // claim a memory block, leave it uninitialized and .. - let x = P::alloc().unwrap().freeze(); + // claim a memory block, initialize it and .. + let x = P::alloc().unwrap().init([0u8; 128]); // .. send it to the `foo` task foo::spawn(x).ok().unwrap(); // send another block to the task `bar` - bar::spawn(P::alloc().unwrap().freeze()).ok().unwrap(); + bar::spawn(P::alloc().unwrap().init([0u8; 128])).ok().unwrap(); } #[task]