littlekernel / lk

LK embedded kernel
MIT License
3.14k stars 615 forks source link

a problem(?) in scheduler #163

Open circl0 opened 7 years ago

circl0 commented 7 years ago

in function get_top_thread (kernel/thread.c)

`uint next_queue = HIGHEST_PRIORITY - __builtin_clz(local_run_queue_bitmap)

if NUM_PRIORITIES is less than 32, the result will be wrong?

Regards, Allen Y.