RIOT
RIOT copied to clipboard
definition of thread flags are uncoordindated between modules
Description
There is a macro THREAD_FLAG_PREDEFINED_MASK
to capture thread flags in-use by RIOT to allow applications to avoid collisions when using flags. However, many flags are in-use inside of modules and are not captured in this macro. Worse, some flags even within RIOT are defined to the same value. All flag definitions should be moved to thread_flags.h and added to the THREAD_FLAG_PREDEFINED_MASK
macro.
Flags to add to THREAD_FLAG_PREDEFINED_MASK
(found with git grep THREAD_FLAG | grep "#define"
):
- [ ] cpu/kinetis/periph/i2c.c:#define
THREAD_FLAG_KINETIS_I2C
(1u << 8) - [ ] drivers/kw41zrf/kw41zrf_netdev.c:#define
KW41ZRF_THREAD_FLAG_ISR
(1u << 8) - [ ] pkg/lvgl/contrib/lvgl.c:#define
LVGL_THREAD_FLAG
(1 << 7) - [ ] pkg/lwip/contrib/netdev/lwip_netdev.c:#define
THREAD_FLAG_LWIP_TX_DONE
(1U << 11) - [ ] sys/include/event.h:#define
THREAD_FLAG_EVENT
(0x1) - #20868 - [ ] sys/include/usb/usbus.h:#define
USBUS_THREAD_FLAG_USBDEV
(0x02) /**< usbdev esr needs handling */ - [ ] sys/include/usb/usbus.h:#define
USBUS_THREAD_FLAG_USBDEV_EP
(0x04) /**< One or more endpoints requires - [ ] sys/posix/include/sys/select.h:#define
POSIX_SELECT_THREAD_FLAG
(1U << 3) - [ ] tests/drivers/cst816s/main.c:#define
CST816S_THREAD_FLAG
(1 << 8) - [ ] tests/pkg/libschc/main.c:#define
THREAD_FLAG_TX_END
(1U << 4)
Versions
- 2024.10-devel-190-g20f7328df4