Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Configuration overlay for 4-CPU testing on QEMU Cortex-A53
CONFIG_MP_MAX_NUM_CPUS=4
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*

Check warning on line 1 in tests/lib/lockfree/boards/qemu_cortex_a53_qemu_cortex_a53_smp.overlay

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

Copyright missing

tests/lib/lockfree/boards/qemu_cortex_a53_qemu_cortex_a53_smp.overlay:1 File has no SPDX-FileCopyrightText header, consider adding one.
* SPDX-License-Identifier: Apache-2.0
*
* Device tree overlay to add 2 more CPUs to QEMU Cortex-A53 SMP
* for testing 4-CPU configurations
*/

/ {
cpus {
cpu@2 {
device_type = "cpu";
compatible = "arm,cortex-a53";
reg = <2>;
};

cpu@3 {
device_type = "cpu";
compatible = "arm,cortex-a53";
reg = <3>;
};
};
};
5 changes: 4 additions & 1 deletion tests/lib/lockfree/src/test_mpsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ static void mpsc_consumer(void *p1, void *p2, void *p3)

nn = CONTAINER_OF(n, struct test_mpsc_node, n);

spsc_acquire(node_q[nn->id]);
/* Return node to producer's free queue - must retry if queue is full */
while (spsc_acquire(node_q[nn->id]) == NULL) {
k_yield();
}
spsc_produce(node_q[nn->id]);
}
}
Expand Down
Loading