| 
    Zephyr Project API 3.7.0
    
   A Scalable Open Source RTOS 
   | 
 
#include <zephyr/init.h>#include <zephyr/arch/cpu.h>#include <zephyr/sys_clock.h>#include <stdbool.h>#include <zephyr/tc_util.h>#include <zephyr/ztest.h>Macros | |
| #define | THREAD_STACK (384 + CONFIG_TEST_EXTRA_STACK_SIZE) | 
| #define | TEST_TICKS_TO_SLEEP (CONFIG_SYS_CLOCK_TICKS_PER_SEC / 2) | 
Functions | |
| static | K_THREAD_STACK_DEFINE (helper_tstack,(384+CONFIG_TEST_EXTRA_STACK_SIZE)) | 
| static void | helper_thread (void *p1, void *p2, void *p3) | 
| static int | ticks_to_sleep (int ticks) | 
| static int | test_early_sleep_post_kernel (void) | 
| SYS_INIT (test_early_sleep_post_kernel, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE) | |
| static int | test_early_sleep_app (void) | 
| SYS_INIT (test_early_sleep_app, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEVICE) | |
| ZTEST (earlysleep, test_early_sleep) | |
| Test early sleep.   | |
| ZTEST_SUITE (earlysleep, NULL, NULL, ztest_simple_1cpu_before, ztest_simple_1cpu_after, NULL) | |
Variables | |
| static struct k_thread | helper_tdata | 
| static k_tid_t | helper_ttid | 
| static int | actual_sleep_ticks | 
| static int | actual_post_kernel_sleep_ticks | 
| static int | actual_app_sleep_ticks | 
| static bool | test_failure = true | 
| #define TEST_TICKS_TO_SLEEP (CONFIG_SYS_CLOCK_TICKS_PER_SEC / 2) | 
| #define THREAD_STACK (384 + CONFIG_TEST_EXTRA_STACK_SIZE) | 
      
  | 
  static | 
      
  | 
  static | 
| SYS_INIT | ( | test_early_sleep_app | , | 
| APPLICATION | , | ||
| CONFIG_KERNEL_INIT_PRIORITY_DEVICE | |||
| ) | 
| SYS_INIT | ( | test_early_sleep_post_kernel | , | 
| POST_KERNEL | , | ||
| CONFIG_KERNEL_INIT_PRIORITY_DEVICE | |||
| ) | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
| ZTEST | ( | earlysleep | , | 
| test_early_sleep | |||
| ) | 
Test early sleep.
| ZTEST_SUITE | ( | earlysleep | , | 
| NULL | , | ||
| NULL | , | ||
| ztest_simple_1cpu_before | , | ||
| ztest_simple_1cpu_after | , | ||
| NULL | |||
| ) | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static |