kernel: support for more than 32 total priorities
In addition to more priorities taking more memory to host them, finding the next thread to run when it is not cached is slower since each extra set of 32 priorities maps to a loop iteration. That loop is remove entirely when the number of priorities is less than 32 (31 + the idle thread). Fixes ZEP-1303. Change-Id: I3205df90d379a0f4456ff1d7f1aaa67ad2cddf15 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
7f1c76f2bf
commit
358a53cb2f
5 changed files with 48 additions and 14 deletions
|
@ -107,7 +107,7 @@ struct _ready_q {
|
|||
struct k_thread *cache;
|
||||
|
||||
/* bitmap of priorities that contain at least one ready thread */
|
||||
uint32_t prio_bmap[1];
|
||||
uint32_t prio_bmap[K_NUM_PRIO_BITMAPS];
|
||||
|
||||
/* ready queues, one per priority */
|
||||
sys_dlist_t q[K_NUM_PRIORITIES];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue