LCOV - code coverage report
Current view: top level - /home/runner/zephyrproject/zephyr/boards/native/native_sim - nsi_if.c (source / functions) Coverage Total Hit
Test: lcov.info Lines: 70.6 % 17 12
Test Date: 2026-01-27 12:19:34 Functions: 80.0 % 5 4
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : /*
       2                 :             :  * Copyright (c) 2023 Nordic Semiconductor ASA
       3                 :             :  *
       4                 :             :  * SPDX-License-Identifier: Apache-2.0
       5                 :             :  */
       6                 :             : 
       7                 :             : #include <soc.h>
       8                 :             : #include <posix_native_task.h>
       9                 :             : #include <nsi_cpu_if.h>
      10                 :             : 
      11                 :           1 : void nsif_cpu0_pre_cmdline_hooks(void)
      12                 :             : {
      13                 :           1 :         run_native_tasks(_NATIVE_PRE_BOOT_1_LEVEL);
      14                 :           1 : }
      15                 :             : 
      16                 :           1 : void nsif_cpu0_pre_hw_init_hooks(void)
      17                 :             : {
      18                 :           1 :         run_native_tasks(_NATIVE_PRE_BOOT_2_LEVEL);
      19                 :           1 : }
      20                 :             : 
      21                 :           1 : void nsif_cpu0_boot(void)
      22                 :             : {
      23                 :           1 :         run_native_tasks(_NATIVE_PRE_BOOT_3_LEVEL);
      24                 :           1 :         posix_boot_cpu();
      25                 :           0 :         run_native_tasks(_NATIVE_FIRST_SLEEP_LEVEL);
      26                 :           0 : }
      27                 :             : 
      28                 :           2 : int nsif_cpu0_cleanup(void)
      29                 :             : {
      30                 :             :         /*
      31                 :             :          * Note posix_soc_clean_up() may not return, but in that case,
      32                 :             :          * nsif_cpu0_cleanup() will be called again
      33                 :             :          */
      34                 :           2 :         posix_soc_clean_up();
      35                 :           1 :         return 0;
      36                 :             : }
      37                 :             : 
      38                 :           0 : void nsif_cpu0_irq_raised(void)
      39                 :             : {
      40                 :           0 :         posix_interrupt_raised();
      41                 :           0 : }
        

Generated by: LCOV version 2.0-1