Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
LIFOs

LIFOs. More...

Functions

 ZTEST (lifo_contexts_1cpu, test_lifo_thread2thread)
 test thread to thread data passing via lifo
 
 ZTEST (lifo_contexts, test_lifo_thread2isr)
 test isr to thread data passing via lifo
 
 ZTEST (lifo_contexts, test_lifo_isr2thread)
 test thread to isr data passing via lifo
 
 ZTEST (lifo_fail, test_lifo_get_fail)
 Test LIFO get fail.
 
 ZTEST (lifo_loop, test_lifo_loop)
 Verify zephyr lifo continuous read write in loop.
 
static void test_thread_timeout_reply_values (void *p1, void *p2, void *p3)
 try getting data on lifo with special timeout value, return result in lifo
 
static void test_thread_timeout_reply_values_wfe (void *p1, void *p2, void *p3)
 
static void test_thread_put_timeout (void *p1, void *p2, void *p3)
 A thread sleeps then puts data on the lifo.
 
 ZTEST (lifo_usage, test_lifo_nowait)
 Test last in, first out queue using LIFO.
 
 ZTEST (lifo_usage_1cpu, test_lifo_wait)
 Test pending reader in LIFO.
 
 ZTEST (lifo_usage_1cpu, test_timeout_empty_lifo)
 Test reading empty LIFO.
 
 ZTEST (lifo_usage, test_timeout_non_empty_lifo)
 Test read and write operation in LIFO with timeout.
 
 ZTEST (lifo_usage_1cpu, test_timeout_lifo_thread)
 Test LIFO with timeout.
 
void test_thread_pend_and_timeout (void *p1, void *p2, void *p3)
 a thread pends on a lifo then times out
 
 ZTEST (lifo_usage_1cpu, test_timeout_threads_pend_on_lifo)
 Test multiple pending readers in LIFO.
 
static void test_para_init (void)
 Test LIFO initialization with various parameters.
 

Detailed Description

LIFOs.

Function Documentation

◆ test_para_init()

static void test_para_init ( void  )
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test LIFO initialization with various parameters.

See also
k_lifo_init(), k_lifo_put()

◆ test_thread_pend_and_timeout()

void test_thread_pend_and_timeout ( void *  p1,
void *  p2,
void *  p3 
)

#include <tests/kernel/lifo/lifo_usage/src/main.c>

a thread pends on a lifo then times out

See also
k_lifo_put(), k_lifo_get()

◆ test_thread_put_timeout()

static void test_thread_put_timeout ( void *  p1,
void *  p2,
void *  p3 
)
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

A thread sleeps then puts data on the lifo.

See also
k_lifo_put()

◆ test_thread_timeout_reply_values()

static void test_thread_timeout_reply_values ( void *  p1,
void *  p2,
void *  p3 
)
static

#include <tests/kernel/lifo/lifo_usage/src/main.c>

try getting data on lifo with special timeout value, return result in lifo

See also
k_lifo_put()

◆ test_thread_timeout_reply_values_wfe()

static void test_thread_timeout_reply_values_wfe ( void *  p1,
void *  p2,
void *  p3 
)
static

◆ ZTEST() [1/11]

ZTEST ( lifo_contexts  ,
test_lifo_isr2thread   
)

#include <tests/kernel/lifo/lifo_api/src/test_lifo_contexts.c>

test thread to isr data passing via lifo

See also
k_fifo_init(), k_lifo_put(), k_lifo_get()

TESTPOINT: test k_lifo_init lifo

TESTPOINT: test K_LIFO_DEFINE lifo

◆ ZTEST() [2/11]

ZTEST ( lifo_contexts  ,
test_lifo_thread2isr   
)

#include <tests/kernel/lifo/lifo_api/src/test_lifo_contexts.c>

test isr to thread data passing via lifo

See also
k_fifo_init(), k_lifo_put(), k_lifo_get()

TESTPOINT: init via k_lifo_init

TESTPOINT: test K_LIFO_DEFINEed lifo

◆ ZTEST() [3/11]

ZTEST ( lifo_contexts_1cpu  ,
test_lifo_thread2thread   
)

#include <tests/kernel/lifo/lifo_api/src/test_lifo_contexts.c>

test thread to thread data passing via lifo

See also
k_fifo_init(), k_lifo_put(), k_lifo_get()

TESTPOINT: init via k_lifo_init

TESTPOINT: test K_LIFO_DEFINEed lifo

◆ ZTEST() [4/11]

ZTEST ( lifo_fail  ,
test_lifo_get_fail   
)

#include <tests/kernel/lifo/lifo_api/src/test_lifo_fail.c>

Test LIFO get fail.

verify zephyr k_lifo_get, it returns NULL when there is no data to read

See also
k_lifo_init(), k_lifo_get()

TESTPOINT: lifo get returns NULL

◆ ZTEST() [5/11]

ZTEST ( lifo_loop  ,
test_lifo_loop   
)

#include <tests/kernel/lifo/lifo_api/src/test_lifo_loop.c>

Verify zephyr lifo continuous read write in loop.

  • Test Steps
    1. lifo put from main thread
    2. lifo read from isr
    3. lifo put from isr
    4. lifo get from spawn thread
    5. loop above steps for LOOPs times
  • Expected Results
    1. lifo data pass correctly and stably across contexts
See also
k_lifo_init(), k_fifo_put(), k_fifo_get()

◆ ZTEST() [6/11]

ZTEST ( lifo_usage  ,
test_lifo_nowait   
)

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test last in, first out queue using LIFO.

See also
k_sem_init(), k_lifo_put(), k_lifo_get()

◆ ZTEST() [7/11]

ZTEST ( lifo_usage  ,
test_timeout_non_empty_lifo   
)

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test read and write operation in LIFO with timeout.

See also
k_lifo_put(), k_lifo_get()

◆ ZTEST() [8/11]

ZTEST ( lifo_usage_1cpu  ,
test_lifo_wait   
)

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test pending reader in LIFO.

See also
k_lifo_init(), k_lifo_get(), k_lifo_put()

◆ ZTEST() [9/11]

ZTEST ( lifo_usage_1cpu  ,
test_timeout_empty_lifo   
)

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test reading empty LIFO.

See also
k_lifo_get()

◆ ZTEST() [10/11]

ZTEST ( lifo_usage_1cpu  ,
test_timeout_lifo_thread   
)

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test LIFO with timeout.

See also
k_lifo_put(), k_lifo_get()

◆ ZTEST() [11/11]

ZTEST ( lifo_usage_1cpu  ,
test_timeout_threads_pend_on_lifo   
)

#include <tests/kernel/lifo/lifo_usage/src/main.c>

Test multiple pending readers in LIFO.

test multiple threads pending on the same lifo with different timeouts

See also
k_lifo_get()