Zephyr Project API 3.7.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
test_threads_cancel_abort.c File Reference
#include <zephyr/ztest.h>
#include "tests_thread_apis.h"

Macros

#define BLOCK_SIZE   64
 

Functions

 K_SEM_DEFINE (sync_sema, 0, 1)
 
static void thread_entry (void *p1, void *p2, void *p3)
 
static void thread_entry_abort (void *p1, void *p2, void *p3)
 
 ZTEST_USER (threads_lifecycle, test_threads_abort_self)
 Validate k_thread_abort() when called by current thread.
 
 ZTEST_USER (threads_lifecycle, test_threads_abort_others)
 Validate k_thread_abort() when called by other thread.
 
 ZTEST (threads_lifecycle_1cpu, test_threads_abort_repeat)
 Test abort on a terminated thread.
 
static void delayed_thread_entry (void *p1, void *p2, void *p3)
 
 ZTEST (threads_lifecycle_1cpu, test_delayed_thread_abort)
 Test abort on delayed thread before it has started execution.
 
static void offload_func (const void *param)
 
static void entry_abort_isr (void *p1, void *p2, void *p3)
 
 ZTEST (threads_lifecycle, test_abort_from_isr)
 Show that threads can be aborted from interrupt context by itself.
 
static void entry_aborted_thread (void *p1, void *p2, void *p3)
 
 ZTEST (threads_lifecycle, test_abort_from_isr_not_self)
 Show that threads can be aborted from interrupt context.
 

Variables

static ZTEST_BMEM int execute_flag
 
bool abort_called
 
void * block
 
static volatile bool isr_finished
 
struct k_sem offload_sem
 
static struct k_sem sem_abort
 

Macro Definition Documentation

◆ BLOCK_SIZE

#define BLOCK_SIZE   64

Function Documentation

◆ delayed_thread_entry()

static void delayed_thread_entry ( void *  p1,
void *  p2,
void *  p3 
)
static

◆ entry_abort_isr()

static void entry_abort_isr ( void *  p1,
void *  p2,
void *  p3 
)
static

◆ entry_aborted_thread()

static void entry_aborted_thread ( void *  p1,
void *  p2,
void *  p3 
)
static

◆ K_SEM_DEFINE()

K_SEM_DEFINE ( sync_sema  ,
,
 
)

◆ offload_func()

static void offload_func ( const void *  param)
static

◆ thread_entry()

static void thread_entry ( void *  p1,
void *  p2,
void *  p3 
)
static

◆ thread_entry_abort()

static void thread_entry_abort ( void *  p1,
void *  p2,
void *  p3 
)
static

TESTPOINT: abort current thread

Variable Documentation

◆ abort_called

bool abort_called

◆ block

void* block

◆ execute_flag

ZTEST_BMEM int execute_flag
static

◆ isr_finished

volatile bool isr_finished
static

◆ offload_sem

struct k_sem offload_sem
extern

◆ sem_abort

struct k_sem sem_abort
static