Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Condition Variables

Functions

void test_condvar_wait_forever_wake (void)
 Test k_condvar_wait() and k_condvar_wake()
 
void test_condvar_wait_timeout_wake (void)
 Test k_condvar_wait() and k_condvar_wake() with timeout.
 
void test_condvar_wait_timeout (void)
 Test k_condvar_wait() and k_condvar_wake() with timeout.
 
void test_condvar_wait_forever (void)
 Test k_condvar_wait() forever.
 
void test_condvar_wait_nowait (void)
 Test k_condvar_wait() with no wait.
 
void test_condvar_wait_nowait_wake (void)
 Test case for conditional variable wait and wake functionality.
 
void test_condvar_wait_forever_wake_from_isr (void)
 Test case for condition variable wait and wake functionality.
 
void test_condvar_multiple_threads_wait_wake (void)
 Test case for multiple threads waiting and waking on a condition variable.
 
void condvar_multiple_wait_wake_task (void *p1, void *p2, void *p3)
 
void condvar_multiple_wake_task (void *p1, void *p2, void *p3)
 
void test_multiple_condvar_wait_wake (void)
 Test multiple threads waiting and waking on a condition variable.
 
static void cond_init_null (void *p1, void *p2, void *p3)
 
void test_condvar_init_null (void)
 Test case for conditional variable initialization with a null parameter.
 
static void cond_signal_null (void *p1, void *p2, void *p3)
 
static void cond_broadcast_null (void *p1, void *p2, void *p3)
 
static void cond_wait_null (void *p1, void *p2, void *p3)
 
void test_condvar_signal_null (void)
 Test case for signaling a condition variable with a NULL parameter.
 
void test_condvar_broadcast_null (void)
 Test case for broadcasting a condition variable with a NULL parameter.
 
void test_condvar_wait_null (void)
 Test case for waiting on a condition variable with a NULL parameter.
 
void inc_count (void *p1, void *p2, void *p3)
 
void watch_count (void *p1, void *p2, void *p3)
 
void test_condvar_usecase_signal (void)
 Test case for conditional variable use case with signal.
 
void test_condvar_usecase_broadcast (void)
 
static void * condvar_tests_setup (void)
 

Detailed Description

Function Documentation

◆ cond_broadcast_null()

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

◆ cond_init_null()

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

◆ cond_signal_null()

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

◆ cond_wait_null()

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

◆ condvar_multiple_wait_wake_task()

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

◆ condvar_multiple_wake_task()

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

◆ condvar_tests_setup()

static void * condvar_tests_setup ( void )
static

◆ inc_count()

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

◆ test_condvar_broadcast_null()

void test_condvar_broadcast_null ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/condvar/condvar_api/src/main.c>

Test case for broadcasting a condition variable with a NULL parameter.

This test creates a thread that attempts to broadcast a condition variable with a NULL parameter. It verifies that the system can handle this edge case correctly and does not result in undefined behavior.

◆ test_condvar_init_null()

void test_condvar_init_null ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/condvar/condvar_api/src/main.c>

Test case for conditional variable initialization with a null parameter.

This test verifies the behavior of the conditional variable initialization when a null parameter is passed. It creates a thread to execute the cond_init_null function and ensures the thread completes execution.

◆ test_condvar_multiple_threads_wait_wake()

void test_condvar_multiple_threads_wait_wake ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/condvar/condvar_api/src/main.c>

Test case for multiple threads waiting and waking on a condition variable.

This test initializes a condition variable and creates multiple threads that wait on the condition variable. Another thread is created to wake up the waiting threads. The test ensures proper synchronization and behavior of threads waiting and waking on the condition variable.

◆ test_condvar_signal_null()

void test_condvar_signal_null ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/condvar/condvar_api/src/main.c>

Test case for signaling a condition variable with a NULL parameter.

This test creates a thread that attempts to signal a condition variable with a NULL parameter. It ensures that the system handles this scenario gracefully without causing unexpected behavior or crashes.

◆ test_condvar_usecase_broadcast()

void test_condvar_usecase_broadcast ( void )

◆ test_condvar_usecase_signal()

void test_condvar_usecase_signal ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/condvar/condvar_api/src/main.c>

Test case for conditional variable use case with signal.

This test verifies the behavior of a conditional variable in a specific use case where a signal is used. It ensures that the conditional variable operates correctly when signaled, validating synchronization mechanisms.

◆ test_condvar_wait_forever()

void test_condvar_wait_forever ( void )

◆ test_condvar_wait_forever_wake()

void test_condvar_wait_forever_wake ( void )

◆ test_condvar_wait_forever_wake_from_isr()

void test_condvar_wait_forever_wake_from_isr ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/condvar/condvar_api/src/main.c>

Test case for condition variable wait and wake functionality.

This test verifies the behavior of a thread waiting on a condition variable with an infinite timeout and being woken up from an interrupt service routine (ISR).

◆ test_condvar_wait_nowait()

void test_condvar_wait_nowait ( void )

◆ test_condvar_wait_nowait_wake()

void test_condvar_wait_nowait_wake ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/condvar/condvar_api/src/main.c>

Test case for conditional variable wait and wake functionality.

This test validates the behavior of conditional variables when a thread waits on a condition and another thread wakes it up.

◆ test_condvar_wait_null()

void test_condvar_wait_null ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/condvar/condvar_api/src/main.c>

Test case for waiting on a condition variable with a NULL parameter.

This test creates a thread that attempts to wait on a condition variable with a NULL parameter. It ensures that the system properly handles this invalid operation and maintains stability.

◆ test_condvar_wait_timeout()

void test_condvar_wait_timeout ( void )

◆ test_condvar_wait_timeout_wake()

void test_condvar_wait_timeout_wake ( void )

◆ test_multiple_condvar_wait_wake()

void test_multiple_condvar_wait_wake ( void )

#include </home/runner/work/safety-doc/zephyr/tests/kernel/condvar/condvar_api/src/main.c>

Test multiple threads waiting and waking on a condition variable.

This test creates multiple threads that wait on a condition variable and another set of threads that wake them up. It ensures that the condition variable mechanism works correctly when multiple threads are involved.

◆ watch_count()

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