Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
#include <ztest.h>
Data Structures | |
struct | thread_data |
Macros | |
#define | INIT_COOP_PRIO -2 |
#define | INIT_COOP_STACK_SIZE (500 + CONFIG_TEST_EXTRA_STACKSIZE) |
#define | INIT_COOP_P1 ((void *)0xFFFF0000) |
#define | INIT_COOP_P2 ((void *)0xCDEF) |
#define | INIT_COOP_P3 ((void *)0x1234) |
#define | INIT_COOP_OPTION (K_USER | K_INHERIT_PERMS) |
#define | INIT_COOP_DELAY 2000 |
#define | INIT_PREEMPT_PRIO 1 |
#define | INIT_PREEMPT_STACK_SIZE (499 + CONFIG_TEST_EXTRA_STACKSIZE) |
#define | INIT_PREEMPT_P1 ((void *)5) |
#define | INIT_PREEMPT_P2 ((void *)6) |
#define | INIT_PREEMPT_P3 ((void *)7) |
#define | INIT_PREEMPT_OPTION (K_USER | K_INHERIT_PERMS) |
#define | INIT_PREEMPT_DELAY 0 |
Functions | |
static void | thread_entry (void *p1, void *p2, void *p3) |
K_THREAD_DEFINE (T_KDEFINE_COOP_THREAD,(500+CONFIG_TEST_EXTRA_STACKSIZE), thread_entry,((void *) 0xFFFF0000),((void *) 0xCDEF),((void *) 0x1234), -2,(K_USER|K_INHERIT_PERMS), 2000) | |
K_THREAD_DEFINE (T_KDEFINE_PREEMPT_THREAD,(499+CONFIG_TEST_EXTRA_STACKSIZE), thread_entry,((void *) 5),((void *) 6),((void *) 7), 1,(K_USER|K_INHERIT_PERMS), 0) | |
K_SEM_DEFINE (start_sema, 0, 1) | |
K_SEM_DEFINE (end_sema, 0, 1) | |
K_THREAD_ACCESS_GRANT (T_KDEFINE_COOP_THREAD, &start_sema, &end_sema) | |
K_THREAD_ACCESS_GRANT (T_KDEFINE_PREEMPT_THREAD, &start_sema, &end_sema) | |
static | K_THREAD_STACK_DEFINE (stack_coop,(500+CONFIG_TEST_EXTRA_STACKSIZE)) |
static | K_THREAD_STACK_DEFINE (stack_preempt,(499+CONFIG_TEST_EXTRA_STACKSIZE)) |
void | test_kdefine_preempt_thread (void) |
test preempt thread initialization via K_THREAD_DEFINE More... | |
void | test_kdefine_coop_thread (void) |
test coop thread initialization via K_THREAD_DEFINE More... | |
void | test_kinit_preempt_thread (void) |
test preempt thread initialization via k_thread_create More... | |
void | test_kinit_coop_thread (void) |
test coop thread initialization via k_thread_create More... | |
void | test_main (void) |
Variables | |
static struct k_thread | thread_coop |
static struct k_thread | thread_preempt |
static ZTEST_BMEM uint64_t | t_create |
static ZTEST_BMEM struct thread_data | expected |
#define INIT_COOP_DELAY 2000 |
#define INIT_COOP_OPTION (K_USER | K_INHERIT_PERMS) |
#define INIT_COOP_P1 ((void *)0xFFFF0000) |
#define INIT_COOP_P2 ((void *)0xCDEF) |
#define INIT_COOP_P3 ((void *)0x1234) |
#define INIT_COOP_PRIO -2 |
#define INIT_COOP_STACK_SIZE (500 + CONFIG_TEST_EXTRA_STACKSIZE) |
#define INIT_PREEMPT_DELAY 0 |
#define INIT_PREEMPT_OPTION (K_USER | K_INHERIT_PERMS) |
#define INIT_PREEMPT_P1 ((void *)5) |
#define INIT_PREEMPT_P2 ((void *)6) |
#define INIT_PREEMPT_P3 ((void *)7) |
#define INIT_PREEMPT_PRIO 1 |
#define INIT_PREEMPT_STACK_SIZE (499 + CONFIG_TEST_EXTRA_STACKSIZE) |
K_SEM_DEFINE | ( | end_sema | , |
0 | , | ||
1 | |||
) |
K_SEM_DEFINE | ( | start_sema | , |
0 | , | ||
1 | |||
) |
K_THREAD_ACCESS_GRANT | ( | T_KDEFINE_COOP_THREAD | , |
& | start_sema, | ||
& | end_sema | ||
) |
K_THREAD_ACCESS_GRANT | ( | T_KDEFINE_PREEMPT_THREAD | , |
& | start_sema, | ||
& | end_sema | ||
) |
K_THREAD_DEFINE | ( | T_KDEFINE_COOP_THREAD | , |
(500+CONFIG_TEST_EXTRA_STACKSIZE) | , | ||
thread_entry | , | ||
((void *) 0xFFFF0000) | , | ||
((void *) 0xCDEF) | , | ||
((void *) 0x1234) | , | ||
- | 2, | ||
(K_USER|K_INHERIT_PERMS) | , | ||
2000 | |||
) |
K_THREAD_DEFINE | ( | T_KDEFINE_PREEMPT_THREAD | , |
(499+CONFIG_TEST_EXTRA_STACKSIZE) | , | ||
thread_entry | , | ||
((void *) 5) | , | ||
((void *) 6) | , | ||
((void *) 7) | , | ||
1 | , | ||
(K_USER|K_INHERIT_PERMS) | , | ||
0 | |||
) |
|
static |
|
static |
TESTPOINT: check delay start
TESTPOINT: check priority and params
|
static |
|
static |
|
static |
|
static |