Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
main.c File Reference
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/sys/barrier.h>
#include <zephyr/toolchain.h>
#include <string.h>
#include <stdlib.h>
#include "targets.h"

Macros

#define INFO(fmt, ...)
 
#define FUNC_TO_PTR(x)
 
#define PTR_TO_FUNC(x)
 
#define DO_BARRIERS()
 

Functions

void k_sys_fatal_error_handler (unsigned int reason, const struct arch_esf *pEsf)
 Fatal error policy handler.
 
static int __noinline add_one (int i)
 
static void execute_from_buffer (uint8_t *dst)
 
void test_write_ro (void)
 Test write to read only section.
 
void test_write_text (void)
 Test to execute on text section.
 
void test_exec_data (void)
 Test execution from data section.
 
void test_exec_stack (void)
 Test execution from stack section.
 
void test_exec_heap (void)
 Test execution from heap.
 
 ZTEST_SUITE (protection, NULL, NULL, NULL, NULL, NULL)
 

Macro Definition Documentation

◆ DO_BARRIERS

#define DO_BARRIERS ( )
Value:
do { } while (0)

◆ FUNC_TO_PTR

#define FUNC_TO_PTR ( x)
Value:
(void *)(x)

◆ INFO

#define INFO ( fmt,
... )
Value:
printk(fmt, ##__VA_ARGS__)
static void printk(const char *fmt,...)
Print kernel debugging message.
Definition printk.h:51

◆ PTR_TO_FUNC

#define PTR_TO_FUNC ( x)
Value:
(int (*)(int))(x)

Function Documentation

◆ add_one()

static int __noinline add_one ( int i)
static

◆ execute_from_buffer()

static void execute_from_buffer ( uint8_t * dst)
static

◆ ZTEST_SUITE()

ZTEST_SUITE ( protection ,
NULL ,
NULL ,
NULL ,
NULL ,
NULL  )