Skip to content

Commit

Permalink
[nrf fromlist] testsuite: coverage: allow disabled multithreading
Browse files Browse the repository at this point in the history
k_sched* are not avaliable when there is CONFIG_MULTITHREADING=n

Upstream PR: zephyrproject-rtos/zephyr#76550

Signed-off-by: Piotr Kosycarz <[email protected]>
  • Loading branch information
nordic-piks authored and rlubos committed Aug 1, 2024
1 parent e84675a commit 631b9a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions subsys/testsuite/coverage/coverage.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ void gcov_coverage_dump(void)
struct gcov_info *gcov_list = gcov_info_head;

if (!k_is_in_isr()) {
#ifdef CONFIG_MULTITHREADING
k_sched_lock();
#endif
}
printk("\nGCOV_COVERAGE_DUMP_START");
while (gcov_list) {
Expand Down Expand Up @@ -293,7 +295,9 @@ void gcov_coverage_dump(void)
coverage_dump_end:
printk("\nGCOV_COVERAGE_DUMP_END\n");
if (!k_is_in_isr()) {
#ifdef CONFIG_MULTITHREADING
k_sched_unlock();
#endif
}
return;
}
Expand Down

0 comments on commit 631b9a2

Please sign in to comment.