Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
test_queue_contexts.c File Reference
#include "test_queue.h"

Macros

#define STACK_SIZE   (512 + CONFIG_TEST_EXTRA_STACK_SIZE)
 
#define LIST_LEN   2
 
#define QUEUE_NUM   10
 Verify that multiple queues can be defined simultaneously.
 

Functions

 K_QUEUE_DEFINE (kqueue)
 TESTPOINT: init via K_QUEUE_DEFINE.
 
 K_HEAP_DEFINE (mem_pool_fail, 8+128)
 
 K_HEAP_DEFINE (mem_pool_pass, 64 *4+128)
 
static K_THREAD_STACK_DEFINE (tstack,(512+CONFIG_TEST_EXTRA_STACK_SIZE))
 
static K_THREAD_STACK_DEFINE (tstack1,(512+CONFIG_TEST_EXTRA_STACK_SIZE))
 
static K_THREAD_STACK_DEFINE (tstack2,(512+CONFIG_TEST_EXTRA_STACK_SIZE))
 
static void tqueue_append (struct k_queue *pqueue)
 
static void tqueue_get (struct k_queue *pqueue)
 
static void tIsr_entry_append (const void *p)
 
static void tIsr_entry_get (const void *p)
 
static void tThread_entry (void *p1, void *p2, void *p3)
 
static void tqueue_thread_thread (struct k_queue *pqueue)
 
static void tqueue_thread_isr (struct k_queue *pqueue)
 
static void tqueue_isr_thread (struct k_queue *pqueue)
 
void test_queue_thread2thread (void)
 Verify data passing between threads using queue.
 
void test_queue_thread2isr (void)
 Verify data passing between thread and ISR.
 
void test_queue_isr2thread (void)
 Verify data passing between ISR and thread.
 
static void tThread_get (void *p1, void *p2, void *p3)
 
static void tqueue_get_2threads (struct k_queue *pqueue)
 
void test_queue_get_2threads (void)
 Verify k_queue_get()
 
static void tqueue_alloc (struct k_queue *pqueue)
 
void test_queue_alloc (void)
 Test queue alloc append and prepend.
 
static void queue_poll_race_consume (void *p1, void *p2, void *p3)
 
void test_queue_poll_race (void)
 
void test_multiple_queues (void)
 
void user_access_queue_private_data (void *p1, void *p2, void *p3)
 
void test_access_kernel_obj_with_priv_data (void)
 Test access kernel object with private data using system call.
 
static void low_prio_wait_for_queue (void *p1, void *p2, void *p3)
 
static void high_prio_t1_wait_for_queue (void *p1, void *p2, void *p3)
 
static void high_prio_t2_wait_for_queue (void *p1, void *p2, void *p3)
 
void test_queue_multithread_competition (void)
 Test multi-threads to get data from a queue.
 
void test_queue_unique_append (void)
 Verify k_queue_unique_append()
 

Variables

struct k_queue queue
 
static qdata_t data [2]
 
static qdata_t data_p [2]
 
static qdata_t data_l [2]
 
static qdata_t data_sl [2]
 
static qdata_tdata_append
 
static qdata_tdata_prepend
 
static struct k_thread tdata
 
static struct k_thread tdata1
 
static struct k_thread tdata2
 
static struct k_sem end_sema
 

Macro Definition Documentation

◆ LIST_LEN

#define LIST_LEN   2

◆ STACK_SIZE

#define STACK_SIZE   (512 + CONFIG_TEST_EXTRA_STACK_SIZE)

Function Documentation

◆ high_prio_t1_wait_for_queue()

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

◆ high_prio_t2_wait_for_queue()

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

◆ K_HEAP_DEFINE() [1/2]

K_HEAP_DEFINE ( mem_pool_fail ,
8+ 128 )

◆ K_HEAP_DEFINE() [2/2]

K_HEAP_DEFINE ( mem_pool_pass ,
64 *4+ 128 )

◆ K_QUEUE_DEFINE()

K_QUEUE_DEFINE ( kqueue )

TESTPOINT: init via K_QUEUE_DEFINE.

◆ K_THREAD_STACK_DEFINE() [1/3]

static K_THREAD_STACK_DEFINE ( tstack ,
(512+CONFIG_TEST_EXTRA_STACK_SIZE)  )
static

◆ K_THREAD_STACK_DEFINE() [2/3]

static K_THREAD_STACK_DEFINE ( tstack1 ,
(512+CONFIG_TEST_EXTRA_STACK_SIZE)  )
static

◆ K_THREAD_STACK_DEFINE() [3/3]

static K_THREAD_STACK_DEFINE ( tstack2 ,
(512+CONFIG_TEST_EXTRA_STACK_SIZE)  )
static

◆ low_prio_wait_for_queue()

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

◆ queue_poll_race_consume()

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

◆ test_multiple_queues()

void test_multiple_queues ( void )

◆ test_queue_poll_race()

void test_queue_poll_race ( void )

◆ tIsr_entry_append()

static void tIsr_entry_append ( const void * p)
static

◆ tIsr_entry_get()

static void tIsr_entry_get ( const void * p)
static

◆ tqueue_alloc()

static void tqueue_alloc ( struct k_queue * pqueue)
static

◆ tqueue_append()

static void tqueue_append ( struct k_queue * pqueue)
static

TESTPOINT: queue append

TESTPOINT: queue prepend

TESTPOINT: queue append list

TESTPOINT: queue merge slist

◆ tqueue_get()

static void tqueue_get ( struct k_queue * pqueue)
static

TESTPOINT: queue get

TESTPOINT: queue get

◆ tqueue_get_2threads()

static void tqueue_get_2threads ( struct k_queue * pqueue)
static

◆ tqueue_isr_thread()

static void tqueue_isr_thread ( struct k_queue * pqueue)
static

TESTPOINT: isr-thread data passing via queue

◆ tqueue_thread_isr()

static void tqueue_thread_isr ( struct k_queue * pqueue)
static

TESTPOINT: thread-isr data passing via queue

◆ tqueue_thread_thread()

static void tqueue_thread_thread ( struct k_queue * pqueue)
static

TESTPOINT: thread-thread data passing via queue

◆ tThread_entry()

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

◆ tThread_get()

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

◆ user_access_queue_private_data()

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

Variable Documentation

◆ data

qdata_t data[2]
static

◆ data_append

qdata_t* data_append
static

◆ data_l

qdata_t data_l[2]
static

◆ data_p

qdata_t data_p[2]
static

◆ data_prepend

qdata_t* data_prepend
static

◆ data_sl

qdata_t data_sl[2]
static

◆ end_sema

struct k_sem end_sema
static

◆ queue

struct k_queue queue

◆ tdata

struct k_thread tdata
static

◆ tdata1

struct k_thread tdata1
static

◆ tdata2

struct k_thread tdata2
static