diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2023-03-01 20:11:00 +0100 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2023-03-01 20:11:00 +0100 |
| commit | 32b537aef63a2f69c5abc83b0af3fd88205ce0ce (patch) | |
| tree | 6ebab2f4e43e87ddbe2bfe89ba25123d799e4226 | |
| parent | c4ee8e8f027a246663514bb5d2d41b21cfd05ed5 (diff) | |
Merge arbiter and channel into sync
| -rw-r--r-- | Cargo.toml | 3 | ||||
| -rw-r--r-- | rtic-arbiter/Cargo.toml | 29 | ||||
| -rw-r--r-- | rtic-channel/.gitignore | 2 | ||||
| -rw-r--r-- | rtic-channel/CHANGELOG.md | 16 | ||||
| -rw-r--r-- | rtic-sync/.gitignore (renamed from rtic-arbiter/.gitignore) | 0 | ||||
| -rw-r--r-- | rtic-sync/CHANGELOG.md (renamed from rtic-arbiter/CHANGELOG.md) | 0 | ||||
| -rw-r--r-- | rtic-sync/Cargo.toml (renamed from rtic-channel/Cargo.toml) | 4 | ||||
| -rw-r--r-- | rtic-sync/src/arbiter.rs (renamed from rtic-arbiter/src/lib.rs) | 8 | ||||
| -rw-r--r-- | rtic-sync/src/channel.rs (renamed from rtic-channel/src/lib.rs) | 8 | ||||
| -rw-r--r-- | rtic-sync/src/lib.rs | 12 | ||||
| -rw-r--r-- | rtic/Cargo.toml | 2 | ||||
| -rw-r--r-- | rtic/examples/async-channel-done.rs | 2 | ||||
| -rw-r--r-- | rtic/examples/async-channel-no-receiver.rs | 2 | ||||
| -rw-r--r-- | rtic/examples/async-channel-no-sender.rs | 2 | ||||
| -rw-r--r-- | rtic/examples/async-channel-try.rs | 2 | ||||
| -rw-r--r-- | rtic/examples/async-channel.rs | 2 |
16 files changed, 21 insertions, 73 deletions
@@ -1,8 +1,7 @@ [workspace] members = [ "rtic", - "rtic-arbiter", - "rtic-channel", + "rtic-sync", "rtic-common", "rtic-macros", "rtic-monotonics", diff --git a/rtic-arbiter/Cargo.toml b/rtic-arbiter/Cargo.toml deleted file mode 100644 index d8b18c4..0000000 --- a/rtic-arbiter/Cargo.toml +++ /dev/null @@ -1,29 +0,0 @@ -[package] -name = "rtic-arbiter" -version = "1.0.0-alpha.0" - -edition = "2021" -authors = [ - "The Real-Time Interrupt-driven Concurrency developers", - "Emil Fresk <emil.fresk@gmail.com>", - "Henrik Tjäder <henrik@tjaders.com>", - "Jorge Aparicio <jorge@japaric.io>", - "Per Lindgren <per.lindgren@ltu.se>", -] -categories = ["concurrency", "embedded", "no-std", "asynchronous"] -description = "rtic-arbiter lib TODO" -license = "MIT OR Apache-2.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -critical-section = "1" -rtic-common = { version = "1.0.0-alpha.0", path = "../rtic-common" } - -[dev-dependencies] -tokio = { version = "1", features = ["rt", "macros", "time"] } - - -[features] -default = [] -testing = ["critical-section/std", "rtic-common/testing"] diff --git a/rtic-channel/.gitignore b/rtic-channel/.gitignore deleted file mode 100644 index 1e7caa9..0000000 --- a/rtic-channel/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Cargo.lock -target/ diff --git a/rtic-channel/CHANGELOG.md b/rtic-channel/CHANGELOG.md deleted file mode 100644 index d3a9d84..0000000 --- a/rtic-channel/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -This project adheres to [Semantic Versioning](http://semver.org/). - -For each category, *Added*, *Changed*, *Fixed* add new entries at the top! - -## [Unreleased] - -### Added - -### Changed - -### Fixed - -## [v1.0.0] - 2023-xx-xx diff --git a/rtic-arbiter/.gitignore b/rtic-sync/.gitignore index 1e7caa9..1e7caa9 100644 --- a/rtic-arbiter/.gitignore +++ b/rtic-sync/.gitignore diff --git a/rtic-arbiter/CHANGELOG.md b/rtic-sync/CHANGELOG.md index d3a9d84..d3a9d84 100644 --- a/rtic-arbiter/CHANGELOG.md +++ b/rtic-sync/CHANGELOG.md diff --git a/rtic-channel/Cargo.toml b/rtic-sync/Cargo.toml index 900f972..440a6be 100644 --- a/rtic-channel/Cargo.toml +++ b/rtic-sync/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rtic-channel" +name = "rtic-sync" version = "1.0.0-alpha.0" edition = "2021" @@ -11,7 +11,7 @@ authors = [ "Per Lindgren <per.lindgren@ltu.se>", ] categories = ["concurrency", "embedded", "no-std", "asynchronous"] -description = "rtic-channel lib TODO" +description = "Synchronization primitives for asynchronous contexts" license = "MIT OR Apache-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rtic-arbiter/src/lib.rs b/rtic-sync/src/arbiter.rs index c70fbf5..d50b1ea 100644 --- a/rtic-arbiter/src/lib.rs +++ b/rtic-sync/src/arbiter.rs @@ -1,9 +1,5 @@ //! Crate -#![no_std] -#![deny(missing_docs)] -//deny_warnings_placeholder_for_ci - use core::cell::UnsafeCell; use core::future::poll_fn; use core::ops::{Deref, DerefMut}; @@ -173,10 +169,6 @@ impl<'a, T> DerefMut for ExclusiveAccess<'a, T> { } #[cfg(test)] -#[macro_use] -extern crate std; - -#[cfg(test)] mod tests { use super::*; diff --git a/rtic-channel/src/lib.rs b/rtic-sync/src/channel.rs index a4e4935..8a817c8 100644 --- a/rtic-channel/src/lib.rs +++ b/rtic-sync/src/channel.rs @@ -1,9 +1,5 @@ //! Crate -#![no_std] -#![deny(missing_docs)] -//deny_warnings_placeholder_for_ci - use core::{ cell::UnsafeCell, future::poll_fn, @@ -464,10 +460,6 @@ impl<'a, T, const N: usize> Drop for Receiver<'a, T, N> { } #[cfg(test)] -#[macro_use] -extern crate std; - -#[cfg(test)] mod tests { use super::*; diff --git a/rtic-sync/src/lib.rs b/rtic-sync/src/lib.rs new file mode 100644 index 0000000..ac06220 --- /dev/null +++ b/rtic-sync/src/lib.rs @@ -0,0 +1,12 @@ +//! Synchronization primitives for asynchronous contexts. + +#![no_std] +#![deny(missing_docs)] +//deny_warnings_placeholder_for_ci + +pub mod arbiter; +pub mod channel; + +#[cfg(test)] +#[macro_use] +extern crate std; diff --git a/rtic/Cargo.toml b/rtic/Cargo.toml index 51a580e..20aa6de 100644 --- a/rtic/Cargo.toml +++ b/rtic/Cargo.toml @@ -47,7 +47,7 @@ heapless = "0.7.7" lm3s6965 = "0.1.3" cortex-m-semihosting = "0.5.0" rtic-time = { path = "../rtic-time" } -rtic-channel = { path = "../rtic-channel" } +rtic-sync = { path = "../rtic-sync" } rtic-monotonics = { path = "../rtic-monotonics", features = ["cortex_m_systick"] } [dev-dependencies.futures] diff --git a/rtic/examples/async-channel-done.rs b/rtic/examples/async-channel-done.rs index 04d94ff..62ed656 100644 --- a/rtic/examples/async-channel-done.rs +++ b/rtic/examples/async-channel-done.rs @@ -12,7 +12,7 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { use cortex_m_semihosting::{debug, hprintln}; - use rtic_channel::*; + use rtic_sync::{channel::*, make_channel}; #[shared] struct Shared {} diff --git a/rtic/examples/async-channel-no-receiver.rs b/rtic/examples/async-channel-no-receiver.rs index ccf0070..ab590e6 100644 --- a/rtic/examples/async-channel-no-receiver.rs +++ b/rtic/examples/async-channel-no-receiver.rs @@ -12,7 +12,7 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { use cortex_m_semihosting::{debug, hprintln}; - use rtic_channel::*; + use rtic_sync::{channel::*, make_channel}; #[shared] struct Shared {} diff --git a/rtic/examples/async-channel-no-sender.rs b/rtic/examples/async-channel-no-sender.rs index 0705ecd..852dc1d 100644 --- a/rtic/examples/async-channel-no-sender.rs +++ b/rtic/examples/async-channel-no-sender.rs @@ -12,7 +12,7 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { use cortex_m_semihosting::{debug, hprintln}; - use rtic_channel::*; + use rtic_sync::{channel::*, make_channel}; #[shared] struct Shared {} diff --git a/rtic/examples/async-channel-try.rs b/rtic/examples/async-channel-try.rs index 26c8a4f..54a51d9 100644 --- a/rtic/examples/async-channel-try.rs +++ b/rtic/examples/async-channel-try.rs @@ -12,7 +12,7 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { use cortex_m_semihosting::{debug, hprintln}; - use rtic_channel::*; + use rtic_sync::{channel::*, make_channel}; #[shared] struct Shared {} diff --git a/rtic/examples/async-channel.rs b/rtic/examples/async-channel.rs index d85b3b5..9798901 100644 --- a/rtic/examples/async-channel.rs +++ b/rtic/examples/async-channel.rs @@ -12,7 +12,7 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { use cortex_m_semihosting::{debug, hprintln}; - use rtic_channel::*; + use rtic_sync::{channel::*, make_channel}; #[shared] struct Shared {} |
