aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-12-06 23:55:58 +0000
committerGitHub <[email protected]>2023-12-06 23:55:58 +0000
commit83138ce68e506692aabd825eae39016ddb8fd2c4 (patch)
tree6ac62c9f6d41e53d0f7f6d9737b1c0c206e531b3 /embassy-executor/src
parentad2d9040d9f36d2523a22752e98f24c661643cb7 (diff)
parentac2aec4e7a8e8a4c17c611810d382892398c9eb7 (diff)
Merge pull request #2262 from embassy-rs/executor-macros
executor: rename macro crate to embassy-executor-macros, bump it.
Diffstat (limited to 'embassy-executor/src')
-rw-r--r--embassy-executor/src/arch/cortex_m.rs2
-rw-r--r--embassy-executor/src/arch/riscv32.rs2
-rw-r--r--embassy-executor/src/arch/std.rs2
-rw-r--r--embassy-executor/src/arch/wasm.rs2
-rw-r--r--embassy-executor/src/lib.rs2
-rw-r--r--embassy-executor/src/raw/mod.rs4
-rw-r--r--embassy-executor/src/spawner.rs4
7 files changed, 9 insertions, 9 deletions
diff --git a/embassy-executor/src/arch/cortex_m.rs b/embassy-executor/src/arch/cortex_m.rs
index 4a6d58575..5c517e0a2 100644
--- a/embassy-executor/src/arch/cortex_m.rs
+++ b/embassy-executor/src/arch/cortex_m.rs
@@ -51,7 +51,7 @@ mod thread {
51 use core::arch::asm; 51 use core::arch::asm;
52 use core::marker::PhantomData; 52 use core::marker::PhantomData;
53 53
54 pub use embassy_macros::main_cortex_m as main; 54 pub use embassy_executor_macros::main_cortex_m as main;
55 55
56 use crate::{raw, Spawner}; 56 use crate::{raw, Spawner};
57 57
diff --git a/embassy-executor/src/arch/riscv32.rs b/embassy-executor/src/arch/riscv32.rs
index ca12c3403..c56f502d3 100644
--- a/embassy-executor/src/arch/riscv32.rs
+++ b/embassy-executor/src/arch/riscv32.rs
@@ -7,7 +7,7 @@ pub use thread::*;
7mod thread { 7mod thread {
8 use core::marker::PhantomData; 8 use core::marker::PhantomData;
9 9
10 pub use embassy_macros::main_riscv as main; 10 pub use embassy_executor_macros::main_riscv as main;
11 use portable_atomic::{AtomicBool, Ordering}; 11 use portable_atomic::{AtomicBool, Ordering};
12 12
13 use crate::{raw, Spawner}; 13 use crate::{raw, Spawner};
diff --git a/embassy-executor/src/arch/std.rs b/embassy-executor/src/arch/std.rs
index 598bb0509..b02b15988 100644
--- a/embassy-executor/src/arch/std.rs
+++ b/embassy-executor/src/arch/std.rs
@@ -8,7 +8,7 @@ mod thread {
8 use std::marker::PhantomData; 8 use std::marker::PhantomData;
9 use std::sync::{Condvar, Mutex}; 9 use std::sync::{Condvar, Mutex};
10 10
11 pub use embassy_macros::main_std as main; 11 pub use embassy_executor_macros::main_std as main;
12 12
13 use crate::{raw, Spawner}; 13 use crate::{raw, Spawner};
14 14
diff --git a/embassy-executor/src/arch/wasm.rs b/embassy-executor/src/arch/wasm.rs
index 3faa92575..f9d0f935c 100644
--- a/embassy-executor/src/arch/wasm.rs
+++ b/embassy-executor/src/arch/wasm.rs
@@ -8,7 +8,7 @@ mod thread {
8 8
9 use core::marker::PhantomData; 9 use core::marker::PhantomData;
10 10
11 pub use embassy_macros::main_wasm as main; 11 pub use embassy_executor_macros::main_wasm as main;
12 use js_sys::Promise; 12 use js_sys::Promise;
13 use wasm_bindgen::prelude::*; 13 use wasm_bindgen::prelude::*;
14 14
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs
index 897696150..4c6900a6d 100644
--- a/embassy-executor/src/lib.rs
+++ b/embassy-executor/src/lib.rs
@@ -6,7 +6,7 @@
6// This mod MUST go first, so that the others see its macros. 6// This mod MUST go first, so that the others see its macros.
7pub(crate) mod fmt; 7pub(crate) mod fmt;
8 8
9pub use embassy_macros::task; 9pub use embassy_executor_macros::task;
10 10
11macro_rules! check_at_most_one { 11macro_rules! check_at_most_one {
12 (@amo [$($feats:literal)*] [] [$($res:tt)*]) => { 12 (@amo [$($feats:literal)*] [] [$($res:tt)*]) => {
diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs
index e9137f8fa..b16a1c7c3 100644
--- a/embassy-executor/src/raw/mod.rs
+++ b/embassy-executor/src/raw/mod.rs
@@ -5,7 +5,7 @@
5//! ## WARNING: here be dragons! 5//! ## WARNING: here be dragons!
6//! 6//!
7//! Using this module requires respecting subtle safety contracts. If you can, prefer using the safe 7//! Using this module requires respecting subtle safety contracts. If you can, prefer using the safe
8//! [executor wrappers](crate::Executor) and the [`embassy_executor::task`](embassy_macros::task) macro, which are fully safe. 8//! [executor wrappers](crate::Executor) and the [`embassy_executor::task`](embassy_executor_macros::task) macro, which are fully safe.
9 9
10#[cfg_attr(target_has_atomic = "ptr", path = "run_queue_atomics.rs")] 10#[cfg_attr(target_has_atomic = "ptr", path = "run_queue_atomics.rs")]
11#[cfg_attr(not(target_has_atomic = "ptr"), path = "run_queue_critical_section.rs")] 11#[cfg_attr(not(target_has_atomic = "ptr"), path = "run_queue_critical_section.rs")]
@@ -97,7 +97,7 @@ impl TaskRef {
97/// A `TaskStorage` must live forever, it may not be deallocated even after the task has finished 97/// A `TaskStorage` must live forever, it may not be deallocated even after the task has finished
98/// running. Hence the relevant methods require `&'static self`. It may be reused, however. 98/// running. Hence the relevant methods require `&'static self`. It may be reused, however.
99/// 99///
100/// Internally, the [embassy_executor::task](embassy_macros::task) macro allocates an array of `TaskStorage`s 100/// Internally, the [embassy_executor::task](embassy_executor_macros::task) macro allocates an array of `TaskStorage`s
101/// in a `static`. The most common reason to use the raw `Task` is to have control of where 101/// in a `static`. The most common reason to use the raw `Task` is to have control of where
102/// the memory for the task is allocated: on the stack, or on the heap with e.g. `Box::leak`, etc. 102/// the memory for the task is allocated: on the stack, or on the heap with e.g. `Box::leak`, etc.
103 103
diff --git a/embassy-executor/src/spawner.rs b/embassy-executor/src/spawner.rs
index 5a3a0dee1..271606244 100644
--- a/embassy-executor/src/spawner.rs
+++ b/embassy-executor/src/spawner.rs
@@ -115,9 +115,9 @@ impl Spawner {
115 } 115 }
116 } 116 }
117 117
118 // Used by the `embassy_macros::main!` macro to throw an error when spawn 118 // Used by the `embassy_executor_macros::main!` macro to throw an error when spawn
119 // fails. This is here to allow conditional use of `defmt::unwrap!` 119 // fails. This is here to allow conditional use of `defmt::unwrap!`
120 // without introducing a `defmt` feature in the `embassy_macros` package, 120 // without introducing a `defmt` feature in the `embassy_executor_macros` package,
121 // which would require use of `-Z namespaced-features`. 121 // which would require use of `-Z namespaced-features`.
122 /// Spawn a task into an executor, panicking on failure. 122 /// Spawn a task into an executor, panicking on failure.
123 /// 123 ///