diff options
| author | Zgarbul Andrey <zgarbul.andrey@gmail.com> | 2021-07-20 11:38:06 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-20 11:38:06 +0300 |
| commit | 5153ff1715a0c0611273a15c90e7bbf7ff7f218e (patch) | |
| tree | eea7230e8020c843f6e59fab3a4e40539f734b76 /examples/pool.rs | |
| parent | e4319de3d526285381f5cc53e14f9a17d123a81a (diff) | |
| parent | 5e92715d8cfce6dd91168ece7ce07502eda3145e (diff) | |
Merge pull request #1 from mriise/const
fix pool example
Diffstat (limited to 'examples/pool.rs')
| -rw-r--r-- | examples/pool.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/pool.rs b/examples/pool.rs index 63be899..7c61dfb 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] |
