Skip to content

Commit

Permalink
example: pool: Do not print the addr
Browse files Browse the repository at this point in the history
Unstable and prone to fail CI
  • Loading branch information
AfoHT committed Feb 26, 2023
1 parent d43c2b6 commit dbc6964
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 0 additions & 2 deletions ci/expected/pool.run
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
bar(0x20000088)
foo(0x2000010c)
12 changes: 4 additions & 8 deletions examples/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pool!(P: [u8; 128]);
#[app(device = lm3s6965, dispatchers = [SSI0, QEI0])]
mod app {
use crate::{Box, Pool};
use cortex_m_semihosting::{debug, hprintln};
use cortex_m_semihosting::debug;
use lm3s6965::Interrupt;

// Import the memory pool into scope
Expand Down Expand Up @@ -57,19 +57,15 @@ mod app {
}

#[task]
fn foo(_: foo::Context, x: Box<P>) {
hprintln!("foo({:?})", x.as_ptr());

fn foo(_: foo::Context, _x: Box<P>) {
// explicitly return the block to the pool
drop(x);
drop(_x);

debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}

#[task(priority = 2)]
fn bar(_: bar::Context, x: Box<P>) {
hprintln!("bar({:?})", x.as_ptr());

fn bar(_: bar::Context, _x: Box<P>) {
// this is done automatically so we can omit the call to `drop`
// drop(x);
}
Expand Down

0 comments on commit dbc6964

Please sign in to comment.