aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-08-22 14:12:13 +0000
committerGitHub <[email protected]>2022-08-22 14:12:13 +0000
commit381ac97746c318963b42eec6ced6773301c91519 (patch)
treeb1b3f644b77c6fcf4a0bbe2eabe19caba27c4c08 /embassy-executor
parent1b9599025868d3a5d0d8e773593b05df8b2fecf2 (diff)
parent478f4727846f6a43c28fff3b09cb639c0b800465 (diff)
Merge #920
920: Remove Forever, switch to static_cell. r=Dirbaio a=Dirbaio Co-authored-by: Dario Nieuwenhuis <[email protected]>
Diffstat (limited to 'embassy-executor')
-rw-r--r--embassy-executor/Cargo.toml1
-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/arch/xtensa.rs2
-rw-r--r--embassy-executor/src/lib.rs6
7 files changed, 12 insertions, 5 deletions
diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml
index 7d5c4a045..184e770cd 100644
--- a/embassy-executor/Cargo.toml
+++ b/embassy-executor/Cargo.toml
@@ -44,6 +44,7 @@ embassy-time = { version = "0.1.0", path = "../embassy-time", optional = true}
44atomic-polyfill = "1.0.1" 44atomic-polyfill = "1.0.1"
45critical-section = "1.1" 45critical-section = "1.1"
46cfg-if = "1.0.0" 46cfg-if = "1.0.0"
47static_cell = "1.0"
47 48
48# WASM dependencies 49# WASM dependencies
49wasm-bindgen = { version = "0.2.76", features = ["nightly"], optional = true } 50wasm-bindgen = { version = "0.2.76", features = ["nightly"], optional = true }
diff --git a/embassy-executor/src/arch/cortex_m.rs b/embassy-executor/src/arch/cortex_m.rs
index d6e758dfb..4b27a264e 100644
--- a/embassy-executor/src/arch/cortex_m.rs
+++ b/embassy-executor/src/arch/cortex_m.rs
@@ -41,7 +41,7 @@ impl Executor {
41 /// Executor instance in a place where it'll live forever and grants you mutable 41 /// Executor instance in a place where it'll live forever and grants you mutable
42 /// access. There's a few ways to do this: 42 /// access. There's a few ways to do this:
43 /// 43 ///
44 /// - a [Forever](crate::util::Forever) (safe) 44 /// - a [StaticCell](https://docs.rs/static_cell/latest/static_cell/) (safe)
45 /// - a `static mut` (unsafe) 45 /// - a `static mut` (unsafe)
46 /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe) 46 /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe)
47 /// 47 ///
diff --git a/embassy-executor/src/arch/riscv32.rs b/embassy-executor/src/arch/riscv32.rs
index 7a7d5698c..2a4b006da 100644
--- a/embassy-executor/src/arch/riscv32.rs
+++ b/embassy-executor/src/arch/riscv32.rs
@@ -43,7 +43,7 @@ impl Executor {
43 /// Executor instance in a place where it'll live forever and grants you mutable 43 /// Executor instance in a place where it'll live forever and grants you mutable
44 /// access. There's a few ways to do this: 44 /// access. There's a few ways to do this:
45 /// 45 ///
46 /// - a [Forever](crate::util::Forever) (safe) 46 /// - a [StaticCell](https://docs.rs/static_cell/latest/static_cell/) (safe)
47 /// - a `static mut` (unsafe) 47 /// - a `static mut` (unsafe)
48 /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe) 48 /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe)
49 /// 49 ///
diff --git a/embassy-executor/src/arch/std.rs b/embassy-executor/src/arch/std.rs
index b93ab8a79..701f0eb18 100644
--- a/embassy-executor/src/arch/std.rs
+++ b/embassy-executor/src/arch/std.rs
@@ -40,7 +40,7 @@ impl Executor {
40 /// Executor instance in a place where it'll live forever and grants you mutable 40 /// Executor instance in a place where it'll live forever and grants you mutable
41 /// access. There's a few ways to do this: 41 /// access. There's a few ways to do this:
42 /// 42 ///
43 /// - a [Forever](crate::util::Forever) (safe) 43 /// - a [StaticCell](https://docs.rs/static_cell/latest/static_cell/) (safe)
44 /// - a `static mut` (unsafe) 44 /// - a `static mut` (unsafe)
45 /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe) 45 /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe)
46 /// 46 ///
diff --git a/embassy-executor/src/arch/wasm.rs b/embassy-executor/src/arch/wasm.rs
index 9d5aa31ed..98091cfbb 100644
--- a/embassy-executor/src/arch/wasm.rs
+++ b/embassy-executor/src/arch/wasm.rs
@@ -59,7 +59,7 @@ impl Executor {
59 /// Executor instance in a place where it'll live forever and grants you mutable 59 /// Executor instance in a place where it'll live forever and grants you mutable
60 /// access. There's a few ways to do this: 60 /// access. There's a few ways to do this:
61 /// 61 ///
62 /// - a [Forever](crate::util::Forever) (safe) 62 /// - a [StaticCell](https://docs.rs/static_cell/latest/static_cell/) (safe)
63 /// - a `static mut` (unsafe) 63 /// - a `static mut` (unsafe)
64 /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe) 64 /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe)
65 pub fn start(&'static mut self, init: impl FnOnce(Spawner)) { 65 pub fn start(&'static mut self, init: impl FnOnce(Spawner)) {
diff --git a/embassy-executor/src/arch/xtensa.rs b/embassy-executor/src/arch/xtensa.rs
index 20bd7b8a5..f908aaa70 100644
--- a/embassy-executor/src/arch/xtensa.rs
+++ b/embassy-executor/src/arch/xtensa.rs
@@ -43,7 +43,7 @@ impl Executor {
43 /// Executor instance in a place where it'll live forever and grants you mutable 43 /// Executor instance in a place where it'll live forever and grants you mutable
44 /// access. There's a few ways to do this: 44 /// access. There's a few ways to do this:
45 /// 45 ///
46 /// - a [Forever](crate::util::Forever) (safe) 46 /// - a [StaticCell](https://docs.rs/static_cell/latest/static_cell/) (safe)
47 /// - a `static mut` (unsafe) 47 /// - a `static mut` (unsafe)
48 /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe) 48 /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe)
49 /// 49 ///
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs
index 93f2eaa6d..e4cbd04b9 100644
--- a/embassy-executor/src/lib.rs
+++ b/embassy-executor/src/lib.rs
@@ -67,3 +67,9 @@ pub mod raw;
67 67
68mod spawner; 68mod spawner;
69pub use spawner::*; 69pub use spawner::*;
70
71/// Do not use. Used for macros and HALs only. Not covered by semver guarantees.
72#[doc(hidden)]
73pub mod _export {
74 pub use static_cell::StaticCell;
75}