Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
main.c File Reference
#include <zephyr.h>
#include <ztest.h>
#include <tc_util.h>
#include <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)
 
void test_fatal (void)
 Test the kernel fatal error handling works correctly. More...
 
void test_main (void)
 

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

◆ test_main()

void test_main ( void  )

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:140
void entry_oops(void *p1, void *p2, void *p3)
Definition: main.c:127
void entry_arbitrary_reason(void *p1, void *p2, void *p3)
Definition: main.c:161
void entry_zephyr_assert(void *p1, void *p2, void *p3)
Definition: main.c:153
void entry_arbitrary_reason_negative(void *p1, void *p2, void *p3)
Definition: main.c:174

◆ expected_reason

ZTEST_DMEM volatile int expected_reason = -1
static