|
Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
#include <zephyr.h>#include <syscall_handler.h>#include <ztest.h>#include <linker/linker-defs.h>#include "test_syscalls.h"#include <mmu.h>#include <syscalls/string_nlen_mrsh.c>#include <syscalls/string_alloc_copy_mrsh.c>#include <syscalls/string_copy_mrsh.c>#include <syscalls/to_copy_mrsh.c>#include <syscalls/syscall_arg64_mrsh.c>#include <syscalls/syscall_arg64_big_mrsh.c>#include <syscalls/more_args_mrsh.c>#include <syscalls/syscall_context_mrsh.c>Macros | |
| #define | BUF_SIZE 32 |
| #define | SLEEP_MS_LONG 15000 |
| #define | FAULTY_ADDRESS Z_FREE_VM_START |
| #define | NR_THREADS (CONFIG_MP_NUM_CPUS * 4) |
| #define | STACK_SZ (1024 + CONFIG_TEST_EXTRA_STACKSIZE) |
Functions | |
| void | test_string_nlen (void) |
| Test to demonstrate usage of z_user_string_nlen() More... | |
| void | test_user_string_alloc_copy (void) |
| Test to verify syscall for string alloc copy. More... | |
| void | test_user_string_copy (void) |
| Test sys_call for string copy. More... | |
| void | test_to_copy (void) |
| Test to demonstrate system call for copy. More... | |
| void | test_arg64 (void) |
| void | test_more_args (void) |
| K_THREAD_STACK_ARRAY_DEFINE (torture_stacks,(CONFIG_MP_NUM_CPUS *4),(1024+CONFIG_TEST_EXTRA_STACKSIZE)) | |
| void | syscall_torture (void *arg1, void *arg2, void *arg3) |
| void | test_syscall_torture (void) |
| void | test_syscall_context_user (void *p1, void *p2, void *p3) |
| void | test_syscall_context (void) |
| K_HEAP_DEFINE (test_heap, 32 *(4 *(CONFIG_MP_NUM_CPUS *4))) | |
| void | test_main (void) |
Variables | |
| char | kernel_string [32] |
| char | kernel_buf [32] |
| ZTEST_BMEM char | user_string [32] |
| struct k_thread | torture_threads [(CONFIG_MP_NUM_CPUS *4)] |
| #define BUF_SIZE 32 |
| #define FAULTY_ADDRESS Z_FREE_VM_START |
| #define NR_THREADS (CONFIG_MP_NUM_CPUS * 4) |
| #define SLEEP_MS_LONG 15000 |
| #define STACK_SZ (1024 + CONFIG_TEST_EXTRA_STACKSIZE) |
| K_HEAP_DEFINE | ( | test_heap | , |
| 32 * | 4 *(CONFIG_MP_NUM_CPUS *4) | ||
| ) |
| K_THREAD_STACK_ARRAY_DEFINE | ( | torture_stacks | , |
| (CONFIG_MP_NUM_CPUS *4) | , | ||
| (1024+CONFIG_TEST_EXTRA_STACKSIZE) | |||
| ) |
Test to demonstrate usage of z_user_string_nlen()
The test will be called from user mode and kernel mode to check the behavior of z_user_string_nlen()
Test to demonstrate system call for copy.
Test to verify syscall for string alloc copy.
Test sys_call for string copy.
| char kernel_buf[32] |
| char kernel_string[32] |
| struct k_thread torture_threads[(CONFIG_MP_NUM_CPUS *4)] |
| ZTEST_BMEM char user_string[32] |