Zephyr Project API 3.7.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
errno.c File Reference
#include <zephyr/ztest.h>
#include <zephyr/kernel.h>
#include <errno.h>
#include <zephyr/sys/errno_private.h>

Data Structures

struct  result
 

Macros

#define N_THREADS   2
 
#define STACK_SIZE   (384 + CONFIG_TEST_EXTRA_STACK_SIZE)
 
#define ERROR_ANY   0xfc
 

Functions

static K_THREAD_STACK_ARRAY_DEFINE (stacks, 2,(384+CONFIG_TEST_EXTRA_STACK_SIZE))
 
 K_THREAD_STACK_DEFINE (eno_stack,(384+CONFIG_TEST_EXTRA_STACK_SIZE))
 
static void errno_thread (void *_n, void *_my_errno, void *_unused)
 
 ZTEST (common_errno, test_thread_context)
 Verify thread context.
 
void thread_entry_user (void *p1, void *p2, void *p3)
 
 ZTEST_USER (common_errno, test_errno)
 Verify errno works well.
 
void * common_setup (void)
 
 ZTEST_SUITE (common_errno, NULL, common_setup, NULL, NULL, NULL)
 

Variables

static struct k_thread threads [2]
 
struct k_thread eno_thread
 
static int errno_values [2+1]
 
struct result result [2]
 
struct k_fifo fifo
 

Macro Definition Documentation

◆ ERROR_ANY

#define ERROR_ANY   0xfc

◆ N_THREADS

#define N_THREADS   2

◆ STACK_SIZE

#define STACK_SIZE   (384 + CONFIG_TEST_EXTRA_STACK_SIZE)

Function Documentation

◆ errno_thread()

static void errno_thread ( void *  _n,
void *  _my_errno,
void *  _unused 
)
static

◆ K_THREAD_STACK_ARRAY_DEFINE()

static K_THREAD_STACK_ARRAY_DEFINE ( stacks  ,
,
(384+CONFIG_TEST_EXTRA_STACK_SIZE)   
)
static

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( eno_stack  ,
(384+CONFIG_TEST_EXTRA_STACK_SIZE)   
)

◆ thread_entry_user()

void thread_entry_user ( void *  p1,
void *  p2,
void *  p3 
)

◆ ZTEST_SUITE()

ZTEST_SUITE ( common_errno  ,
NULL  ,
common_setup  ,
NULL  ,
NULL  ,
NULL   
)

Variable Documentation

◆ eno_thread

struct k_thread eno_thread

◆ errno_values

int errno_values[2+1]
static
Initial value:
= {
0xbabef00d,
0xdeadbeef,
0xabad1dea,
}

◆ fifo

struct k_fifo fifo

◆ result

struct result result[2]

◆ threads

struct k_thread threads[2]
static