Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
#include "mem_protect.h"
#include <syscall_handler.h>
#include <syscalls/ret_resource_pool_ptr_mrsh.c>
Functions | |
static void | dummy_start (struct k_timer *timer) |
static void | dummy_end (struct k_timer *timer) |
K_THREAD_STACK_DEFINE (test_1_stack, CONFIG_MAIN_STACK_SIZE) | |
K_THREAD_STACK_DEFINE (parent_thr_stack,(512+CONFIG_TEST_EXTRA_STACKSIZE)) | |
K_THREAD_STACK_DEFINE (child_thr_stack,(512+CONFIG_TEST_EXTRA_STACKSIZE)) | |
K_HEAP_DEFINE (heap_mem, 64 *2) | |
K_SEM_DEFINE (inherit_sem,(0),(10)) | |
K_SEM_DEFINE (sync_sem,(0U),(1U)) | |
K_MUTEX_DEFINE (inherit_mutex) | |
K_TIMER_DEFINE (inherit_timer, dummy_start, dummy_end) | |
K_MSGQ_DEFINE (inherit_msgq,(10),(10),(2)) | |
K_MEM_PARTITION_DEFINE (inherit_memory_partition, inherit_buf, sizeof(inherit_buf), K_MEM_PARTITION_P_RW_U_RW) | |
static void | access_test (void) |
static void | test_thread_1_for_user (void *p1, void *p2, void *p3) |
static void | test_thread_1_for_SU (void *p1, void *p2, void *p3) |
void | test_permission_inheritance (void) |
Test object permission inheritance except of the parent thread object. More... | |
void | child_handler (void *p1, void *p2, void *p3) |
void | parent_handler (void *p1, void *p2, void *p3) |
void | test_inherit_resource_pool (void) |
Test child thread inherits parent's thread resource pool. More... | |
Variables | |
struct k_thread test_1_tid parent_thr | child_thr |
k_tid_t | parent_tid |
uint8_t | inherit_buf [MEM_REGION_ALLOC] |
struct k_mem_partition * | inherit_memory_partition_array [] |
struct k_mem_domain | inherit_mem_domain |
struct k_heap * | child_heap_mem_ptr |
struct k_heap * | parent_heap_mem_ptr |
|
inlinestatic |
|
inlinestatic |
K_HEAP_DEFINE | ( | heap_mem | , |
64 * | 2 | ||
) |
K_MEM_PARTITION_DEFINE | ( | inherit_memory_partition | , |
inherit_buf | , | ||
sizeof(inherit_buf) | , | ||
K_MEM_PARTITION_P_RW_U_RW | |||
) |
K_MSGQ_DEFINE | ( | inherit_msgq | , |
(10) | , | ||
(10) | , | ||
(2) | |||
) |
K_MUTEX_DEFINE | ( | inherit_mutex | ) |
K_SEM_DEFINE | ( | inherit_sem | , |
(0) | , | ||
(10) | |||
) |
K_SEM_DEFINE | ( | sync_sem | , |
(0U) | , | ||
(1U) | |||
) |
K_THREAD_STACK_DEFINE | ( | child_thr_stack | , |
(512+CONFIG_TEST_EXTRA_STACKSIZE) | |||
) |
K_THREAD_STACK_DEFINE | ( | parent_thr_stack | , |
(512+CONFIG_TEST_EXTRA_STACKSIZE) | |||
) |
K_THREAD_STACK_DEFINE | ( | test_1_stack | , |
CONFIG_MAIN_STACK_SIZE | |||
) |
K_TIMER_DEFINE | ( | inherit_timer | , |
dummy_start | , | ||
dummy_end | |||
) |
Test child thread inherits parent's thread resource pool.
Test object permission inheritance except of the parent thread object.
struct k_heap* child_heap_mem_ptr |
struct k_thread test_1_tid parent_thr child_thr |
uint8_t inherit_buf[MEM_REGION_ALLOC] |
struct k_mem_domain inherit_mem_domain |
struct k_mem_partition* inherit_memory_partition_array[] |
struct k_heap* parent_heap_mem_ptr |
k_tid_t parent_tid |