Zephyr Project API  3.3.0
A Scalable Open Source RTOS
main.c File Reference
#include <zephyr/kernel.h>
#include <zephyr/ztest.h>
#include <zephyr/tc_util.h>
#include <zephyr/kernel_structs.h>
#include <kernel_internal.h>
#include <assert.h>

Macros

#define EXC_TRIGGER_FUNC_IDX   0
 

Typedefs

typedef void(* exc_trigger_func_t) (void)
 

Functions

void k_sys_fatal_error_handler (unsigned int reason, const z_arch_esf_t *pEsf)
 Fatal error policy handler. More...
 
static void entry_cpu_exception (void)
 
static void entry_oops (void)
 
static void entry_panic (void)
 
static void entry_zephyr_assert (void)
 
static void entry_arbitrary_reason (void)
 
static void entry_arbitrary_reason_negative (void)
 
 ZTEST (fatal_no_mt, test_fatal)
 Test the kernel fatal error handling works correctly. More...
 
 ZTEST_SUITE (fatal_no_mt, NULL, NULL, NULL, NULL, NULL)
 

Variables

static ZTEST_DMEM volatile int expected_reason = -1
 
static const exc_trigger_func_t exc_trigger_func []
 

Macro Definition Documentation

◆ EXC_TRIGGER_FUNC_IDX

#define EXC_TRIGGER_FUNC_IDX   0

Typedef Documentation

◆ exc_trigger_func_t

typedef void(* exc_trigger_func_t) (void)

Function Documentation

◆ entry_arbitrary_reason()

static void entry_arbitrary_reason ( void  )
static

◆ entry_arbitrary_reason_negative()

static void entry_arbitrary_reason_negative ( void  )
static

◆ entry_cpu_exception()

static void entry_cpu_exception ( void  )
static

◆ entry_oops()

static void entry_oops ( void  )
static

◆ entry_panic()

static void entry_panic ( void  )
static

◆ entry_zephyr_assert()

static void entry_zephyr_assert ( void  )
static

◆ ZTEST_SUITE()

ZTEST_SUITE ( fatal_no_mt  ,
NULL  ,
NULL  ,
NULL  ,
NULL  ,
NULL   
)

Variable Documentation

◆ exc_trigger_func

const exc_trigger_func_t exc_trigger_func[]
static
Initial value:
= {
}
void entry_cpu_exception(void *p1, void *p2, void *p3)
Definition: main.c:72
void entry_panic(void *p1, void *p2, void *p3)
Definition: main.c:139
void entry_oops(void *p1, void *p2, void *p3)
Definition: main.c:130
void entry_arbitrary_reason(void *p1, void *p2, void *p3)
Definition: main.c:156
void entry_zephyr_assert(void *p1, void *p2, void *p3)
Definition: main.c:148
void entry_arbitrary_reason_negative(void *p1, void *p2, void *p3)
Definition: main.c:165

◆ expected_reason

ZTEST_DMEM volatile int expected_reason = -1
static