7 #include <zephyr/ztest.h>
9 #include <zephyr/kernel.h>
25 void* fifo_reserved{};
30 std::array<item, 4> g_item_array;
39 using namespace std::chrono;
51 for (
auto& item: g_item_array) {
53 item.more_data = 0x5678;
54 g_fifo.push_back(&item);
63 for (
auto& item: g_item_array) {
64 auto res = g_fifo.try_pop_front();
65 zassert_equal(res->data, 0x1234,
nullptr);
66 zassert_equal(res->more_data, 0x5678,
nullptr);
67 zassert_equal(res, &item,
nullptr);
73 for (
auto& item: g_item_array) {
74 g_fifo.push_back(&item);
82 zassert_equal(!!res,
true,
"");
87 for (
auto& item: g_item_array) {
88 auto res = g_fifo.try_pop_front();
89 zassert_equal(res->data, 0x1234,
nullptr);
90 zassert_equal(res->more_data, 0x5678,
nullptr);
91 zassert_equal(res, &item,
nullptr);
fifo that manages a k_fifo object
Thread creation attributes.
thread_data holds the stack and thread control block memory
static constexpr thread_prio preempt(int prio) noexcept
Create a preemptive priority value.
The class thread repecents a single Zephyr thread.
auto join() noexcept
join the thread this object mamages.
ZTEST(zpp_atomic_tests, test_atomic_bitset)
ZTEST_SUITE(zpp_atomic_tests, NULL, NULL, NULL, NULL, NULL)
#define ZPP_THREAD_STACK_DEFINE(sym, size)