lib: os: remove dead code
If multithreading is disabled, thread_entry() never runs since we cannot create threads; the non-multithreading case was simply dead code. Indicate to code coverage that CODE_UNREACHABLE should be skipped. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
676b1ae93a
commit
db84a76379
1 changed files with 1 additions and 7 deletions
|
@ -28,18 +28,12 @@ FUNC_NORETURN void z_thread_entry(k_thread_entry_t entry,
|
|||
{
|
||||
entry(p1, p2, p3);
|
||||
|
||||
#ifdef CONFIG_MULTITHREADING
|
||||
k_thread_abort(k_current_get());
|
||||
#else
|
||||
for (;;) {
|
||||
k_cpu_idle();
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compiler can't tell that k_thread_abort() won't return and issues a
|
||||
* warning unless we tell it that control never gets this far.
|
||||
*/
|
||||
|
||||
CODE_UNREACHABLE;
|
||||
CODE_UNREACHABLE; /* LCOV_EXCL_LINE */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue