1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/core
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
..
include core: implement core_mutex_mitigate_priority_inversion 2022-08-05 13:08:52 +02:00
lib core/kernel_defines: drop CONST definition 2022-06-16 15:26:27 +02:00
cond.c core/*: realign ENABLE_DEBUG 2020-10-23 00:45:56 +02:00
doc.txt core/doc: fix alignment 2020-04-21 15:10:56 +02:00
Kconfig core: implement core_mutex_mitigate_priority_inversion 2022-08-05 13:08:52 +02:00
Makefile core/thread, mutex: provide dummy implementation for riotboot 2022-05-02 13:18:39 +02:00
mbox.c core: apply uncrustify patches 2021-02-02 22:21:14 +01:00
msg_bus.c core: Access internal vars via helper funcs 2020-08-06 16:47:33 +02:00
msg.c core/msg: yield after thread_flags_wake() in queue_msg() 2022-04-21 17:28:41 +02:00
mutex.c core: implement core_mutex_mitigate_priority_inversion 2022-08-05 13:08:52 +02:00
sched.c core/sched.c: fix undefined behavior on 8-bit/16-bit 2022-09-09 21:55:17 +02:00
thread_flags.c core: apply uncrustify patches 2021-02-02 22:21:14 +01:00
thread.c core: add support for test_utils_print_stack_usage 2022-03-29 21:49:35 +02:00