Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
pi.c File Reference
#include <zephyr/ztest.h>
#include "float_context.h"
#include "test_common.h"

Macros

#define FP_TYPE   float
 
#define FP_CONSTANT(x)
 

Functions

static K_SEM_DEFINE (test_exit_sem, 0, 1)
 
static void calculate_pi_low (void)
 Entry point for the low priority pi compute task.
 
static void calculate_pi_high (void)
 Entry point for the high priority pi compute task.
 
 K_THREAD_DEFINE (pi_low,(1024+CONFIG_TEST_EXTRA_STACK_SIZE), calculate_pi_low, NULL, NULL, NULL, 10,(K_FP_REGS), K_TICKS_FOREVER)
 
 K_THREAD_DEFINE (pi_high,(1024+CONFIG_TEST_EXTRA_STACK_SIZE), calculate_pi_high, NULL, NULL, NULL, 5,(K_FP_REGS), K_TICKS_FOREVER)
 
void test_pi (void)
 

Variables

static float reference_pi = 0.0f
 
static volatile unsigned int calc_pi_low_count
 
static volatile unsigned int calc_pi_high_count
 
static volatile bool test_exited
 

Macro Definition Documentation

◆ FP_CONSTANT

#define FP_CONSTANT ( x)
Value:
x##f
struct k_futex f
Definition kobject.c:1327

◆ FP_TYPE

#define FP_TYPE   float

Function Documentation

◆ calculate_pi_high()

static void calculate_pi_high ( void )
static

Entry point for the high priority pi compute task.

◆ calculate_pi_low()

static void calculate_pi_low ( void )
static

Entry point for the low priority pi compute task.

◆ K_SEM_DEFINE()

static K_SEM_DEFINE ( test_exit_sem ,
0 ,
1  )
static

◆ K_THREAD_DEFINE() [1/2]

K_THREAD_DEFINE ( pi_high ,
(1024+CONFIG_TEST_EXTRA_STACK_SIZE) ,
calculate_pi_high ,
NULL ,
NULL ,
NULL ,
5 ,
(K_FP_REGS) ,
K_TICKS_FOREVER  )

◆ K_THREAD_DEFINE() [2/2]

K_THREAD_DEFINE ( pi_low ,
(1024+CONFIG_TEST_EXTRA_STACK_SIZE) ,
calculate_pi_low ,
NULL ,
NULL ,
NULL ,
10 ,
(K_FP_REGS) ,
K_TICKS_FOREVER  )

◆ test_pi()

void test_pi ( void )

Variable Documentation

◆ calc_pi_high_count

volatile unsigned int calc_pi_high_count
static

◆ calc_pi_low_count

volatile unsigned int calc_pi_low_count
static

◆ reference_pi

float reference_pi = 0.0f
static

◆ test_exited

volatile bool test_exited
static