littlekernel / lk

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

[kernel] fix get top thread error if NUM_PRIORITIES < 32 #165

Closed circl0 closed 7 years ago

circl0 commented 7 years ago

if NUM_PRIORITIES < 32, result will be negative?

travisg commented 7 years ago

looks good. I dont think it's ever been compiled with <32 priorities, though it does make sense to do so on memory constrained devices. 8 will probably suffice in that case.