Skip to content

Commit

Permalink
edge-executor support moved to edge-executor
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Oct 5, 2023
1 parent 2c0427f commit 358c977
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ num_enum = { version = "0.7", default-features = false }
enumset = { version = "1", default-features = false }
atomic-waker = { version = "1.1.1", optional = true, default-features = false }
embassy-sync = { version = "0.2" }
edge-executor = { version = "0.3", optional = true, default-features = false }

[build-dependencies]
embuild = "0.31.3"
Expand Down
41 changes: 0 additions & 41 deletions src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,47 +846,6 @@ pub mod notification {
}
}

#[cfg(all(
feature = "edge-executor",
feature = "alloc",
target_has_atomic = "ptr"
))]
pub mod executor {
use core::num::NonZeroU32;

use super::notification;

pub use edge_executor::*;

pub type EspExecutor<'a, const C: usize, S> = Executor<'a, C, FreeRtosMonitor, S>;
pub type EspBlocker = Blocker<FreeRtosMonitor>;

pub type FreeRtosMonitor = notification::Monitor;
pub type FreeRtosNotify = notification::Notifier;

impl Monitor for notification::Monitor {
type Notify = notification::Notifier;

fn notifier(&self) -> Self::Notify {
notification::Monitor::notifier(self)
}
}

impl Wait for notification::Monitor {
fn wait(&self) {
notification::Monitor::wait_any(self)
}
}

impl Notify for notification::Notifier {
fn notify(&self) {
unsafe {
notification::Notifier::notify_and_yield(self, NonZeroU32::new(1).unwrap());
}
}
}
}

pub mod queue {
use core::{
marker::PhantomData,
Expand Down

0 comments on commit 358c977

Please sign in to comment.