Skip to content
Permalink
Browse files

kernel: init: fix coverage gap

We don't get any coverage past when we dump the coverage data,
so exclude the end of the function and move setting the main
thread as nonessential to immediately before the coverage dump.
The comment was also amended.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
  • Loading branch information...
andrewboie authored and nashif committed Jun 11, 2019
1 parent fe228a8 commit 8e053330fe608252a095bc8eec0d4c61674dcca9
Showing with 4 additions and 4 deletions.
  1. +4 −4 kernel/init.c
@@ -286,12 +286,12 @@ static void bg_thread_main(void *unused1, void *unused2, void *unused3)

main();

/* Mark nonessenrial since main() has no more work to do */
_main_thread->base.user_options &= ~K_ESSENTIAL;

/* Dump coverage data once the main() has exited. */
gcov_coverage_dump();

/* Terminate thread normally since it has no more work to do */
_main_thread->base.user_options &= ~K_ESSENTIAL;
}
} /* LCOV_EXCL_LINE ... because we just dumped final coverage data */

/* LCOV_EXCL_START */

0 comments on commit 8e05333

Please sign in to comment.
You can’t perform that action at this time.