1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-19 19:43:52 +01:00
Marian Buschsieweke d53cd19142
core/sched.c: fix undefined behavior on 8-bit/16-bit
An `1 << x` with `x >= 15` is undefined behavior on 8-bit / 16-bit
machines (which typically have `sizeof(int) == 2`).

Using `1UL << x` is safe for `x <= 31`, which is large enough to make
use of the full 32 bits in `runqueue_bitcache`.

In addition, a `static_assert()` is added to enforce that
`SCHED_PRIO_LEVELS` is never set to anything larger than 32.
2022-09-09 21:55:17 +02:00
..
2020-10-23 00:45:56 +02:00
2020-04-21 15:10:56 +02:00
2021-02-02 22:21:14 +01:00
2021-02-02 22:21:14 +01:00