Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS

Tests for Kernel Futex objects. More...

void test_futex_wait_forever (void)
 Test k_futex_wait() forever. More...
 
void test_futex_locate_access (void)
 Test kernel supports locating kernel objects without private kernel data anywhere in memory, control access with the memory domain configuration. More...
 
void test_futex_wait_timeout (void)
 
void test_futex_wait_nowait (void)
 
void test_futex_wait_forever_wake (void)
 Test k_futex_wait() and k_futex_wake() More...
 
void test_futex_wait_timeout_wake (void)
 
void test_futex_wait_nowait_wake (void)
 
void test_futex_wait_forever_wake_from_isr (void)
 
void test_futex_multiple_threads_wait_wake (void)
 
void test_multiple_futex_wait_wake (void)
 
void test_user_futex_bad (void)
 
void futex_wait_wake (void *p1, void *p2, void *p3)
 
void futex_wake (void *p1, void *p2, void *p3)
 
void test_main (void)
 

Detailed Description

Tests for Kernel Futex objects.

Function Documentation

◆ futex_wait_wake()

void futex_wait_wake ( void p1,
void p2,
void p3 
)

◆ futex_wake()

void futex_wake ( void p1,
void p2,
void p3 
)

◆ test_futex_locate_access()

void test_futex_locate_access ( void  )

#include <tests/kernel/mem_protect/futex/src/main.c>

Test kernel supports locating kernel objects without private kernel data anywhere in memory, control access with the memory domain configuration.

For that test kernel object which doesn't contain private kernel data will be used futex. Test performs handshaking between two user threads to test next requirements:

  • Place a futex simple_futex in user memory using ZTEST_BMEM
  • Show that user threads can write to futex value
  • Show that user threads can make wait/wake syscalls on it.
See also
atomic_set(), atomic_sub(), k_futex_wake(), k_futex_wait()

◆ test_futex_multiple_threads_wait_wake()

void test_futex_multiple_threads_wait_wake ( void  )

◆ test_futex_wait_forever()

void test_futex_wait_forever ( void  )

◆ test_futex_wait_forever_wake()

void test_futex_wait_forever_wake ( void  )

◆ test_futex_wait_forever_wake_from_isr()

void test_futex_wait_forever_wake_from_isr ( void  )

◆ test_futex_wait_nowait()

void test_futex_wait_nowait ( void  )

◆ test_futex_wait_nowait_wake()

void test_futex_wait_nowait_wake ( void  )

◆ test_futex_wait_timeout()

void test_futex_wait_timeout ( void  )

◆ test_futex_wait_timeout_wake()

void test_futex_wait_timeout_wake ( void  )

◆ test_main()

void test_main ( void  )

#include <tests/kernel/mem_protect/futex/src/main.c>

test case main entry

◆ test_multiple_futex_wait_wake()

void test_multiple_futex_wait_wake ( void  )

◆ test_user_futex_bad()

void test_user_futex_bad ( void  )