mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +01:00
Fix CI for rtic-channel
This commit is contained in:
parent
bb98c315e0
commit
e6c82b7a4d
2 changed files with 5 additions and 5 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -482,7 +482,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run cargo test
|
- name: Run cargo test
|
||||||
working-directory: ./rtic-channel
|
working-directory: ./rtic-channel
|
||||||
run: cargo test --test tests
|
run: cargo test --features testing
|
||||||
|
|
||||||
# Run test suite
|
# Run test suite
|
||||||
testsmonotonics:
|
testsmonotonics:
|
||||||
|
|
|
@ -140,7 +140,7 @@ struct LinkPtr(*mut Option<wait_queue::Link<Waker>>);
|
||||||
|
|
||||||
impl LinkPtr {
|
impl LinkPtr {
|
||||||
/// This will dereference the pointer stored within and give out an `&mut`.
|
/// This will dereference the pointer stored within and give out an `&mut`.
|
||||||
unsafe fn get(&self) -> &mut Option<wait_queue::Link<Waker>> {
|
unsafe fn get(&mut self) -> &mut Option<wait_queue::Link<Waker>> {
|
||||||
&mut *self.0
|
&mut *self.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -203,9 +203,9 @@ impl<'a, T, const N: usize> Sender<'a, T, N> {
|
||||||
let mut link_ptr: Option<wait_queue::Link<Waker>> = None;
|
let mut link_ptr: Option<wait_queue::Link<Waker>> = None;
|
||||||
|
|
||||||
// Make this future `Drop`-safe, also shadow the original definition so we can't abuse it.
|
// Make this future `Drop`-safe, also shadow the original definition so we can't abuse it.
|
||||||
let link_ptr = LinkPtr(&mut link_ptr as *mut Option<wait_queue::Link<Waker>>);
|
let mut link_ptr = LinkPtr(&mut link_ptr as *mut Option<wait_queue::Link<Waker>>);
|
||||||
|
|
||||||
let link_ptr2 = link_ptr.clone();
|
let mut link_ptr2 = link_ptr.clone();
|
||||||
let dropper = OnDrop::new(|| {
|
let dropper = OnDrop::new(|| {
|
||||||
// SAFETY: We only run this closure and dereference the pointer if we have
|
// SAFETY: We only run this closure and dereference the pointer if we have
|
||||||
// exited the `poll_fn` below in the `drop(dropper)` call. The other dereference
|
// exited the `poll_fn` below in the `drop(dropper)` call. The other dereference
|
||||||
|
@ -532,7 +532,7 @@ mod tests {
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn stress_channel() {
|
async fn stress_channel() {
|
||||||
const NUM_RUNS: usize = 1_000;
|
const NUM_RUNS: usize = 1_000000;
|
||||||
const QUEUE_SIZE: usize = 10;
|
const QUEUE_SIZE: usize = 10;
|
||||||
|
|
||||||
let (s, mut r) = make_channel!(u32, QUEUE_SIZE);
|
let (s, mut r) = make_channel!(u32, QUEUE_SIZE);
|
||||||
|
|
Loading…
Reference in a new issue