kernel: correct the highest priority in coop-only modes
In such a case, the system must take the idle coop priority into account. Change-Id: Ica5a4a7a659cb165073e9b8042a77ed23a6a662a Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
This commit is contained in:
parent
92af5aecab
commit
edb3570913
1 changed files with 6 additions and 2 deletions
|
@ -59,10 +59,14 @@ extern "C" {
|
|||
#define K_ANY NULL
|
||||
#define K_END NULL
|
||||
|
||||
#if CONFIG_NUM_COOP_PRIORITIES > 0
|
||||
#if defined(CONFIG_COOP_ENABLED) && defined(CONFIG_PREEMPT_ENABLED)
|
||||
#define K_HIGHEST_THREAD_PRIO (-CONFIG_NUM_COOP_PRIORITIES)
|
||||
#else
|
||||
#elif defined(CONFIG_COOP_ENABLED)
|
||||
#define K_HIGHEST_THREAD_PRIO (-CONFIG_NUM_COOP_PRIORITIES - 1)
|
||||
#elif defined(CONFIG_PREEMPT_ENABLED)
|
||||
#define K_HIGHEST_THREAD_PRIO 0
|
||||
#else
|
||||
#error "invalid configuration"
|
||||
#endif
|
||||
|
||||
#if CONFIG_NUM_PREEMPT_PRIORITIES > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue