LCOV - code coverage report
Current view: top level - home/runner/zephyrproject/zephyr/soc/native/inf_clock - native_tasks.c (source / functions) Hit Total Coverage
Test: lcov.info Lines: 14 14 100.0 %
Date: 2024-09-16 20:15:30 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 2 100.0 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Copyright (c) 2017 Oticon A/S
       3                 :            :  *
       4                 :            :  * SPDX-License-Identifier: Apache-2.0
       5                 :            :  */
       6                 :            : 
       7                 :            : /**
       8                 :            :  * @brief Run the set of special native tasks corresponding to the given level
       9                 :            :  *
      10                 :            :  * @param level One of _NATIVE_*_LEVEL as defined in soc.h
      11                 :            :  */
      12                 :          4 : void run_native_tasks(int level)
      13                 :            : {
      14                 :          4 :         extern void (*__native_PRE_BOOT_1_tasks_start[])(void);
      15                 :          4 :         extern void (*__native_PRE_BOOT_2_tasks_start[])(void);
      16                 :          4 :         extern void (*__native_PRE_BOOT_3_tasks_start[])(void);
      17                 :          4 :         extern void (*__native_FIRST_SLEEP_tasks_start[])(void);
      18                 :          4 :         extern void (*__native_ON_EXIT_tasks_start[])(void);
      19                 :          4 :         extern void (*__native_tasks_end[])(void);
      20                 :            : 
      21                 :          4 :         static void (**native_pre_tasks[])(void) = {
      22                 :            :                 __native_PRE_BOOT_1_tasks_start,
      23                 :            :                 __native_PRE_BOOT_2_tasks_start,
      24                 :            :                 __native_PRE_BOOT_3_tasks_start,
      25                 :            :                 __native_FIRST_SLEEP_tasks_start,
      26                 :            :                 __native_ON_EXIT_tasks_start,
      27                 :            :                 __native_tasks_end
      28                 :            :         };
      29                 :            : 
      30                 :          4 :         void (**fptr)(void);
      31                 :            : 
      32         [ +  + ]:          7 :         for (fptr = native_pre_tasks[level]; fptr < native_pre_tasks[level+1];
      33                 :          3 :                 fptr++) {
      34                 :          3 :                 if (*fptr) { /* LCOV_EXCL_BR_LINE */
      35                 :          3 :                         (*fptr)();
      36                 :            :                 }
      37                 :            :         }
      38                 :          4 : }

Generated by: LCOV version 1.14