From d95851253756d715f922485a28a009e1331d173e Mon Sep 17 00:00:00 2001 From: Joshua DeWeese Date: Thu, 19 Sep 2024 21:30:57 -0400 Subject: [PATCH] sys/event: add event thread flag to THREAD_FLAG_PREDEFINED_MASK --- core/include/thread_flags.h | 14 +++++++++++++- sys/include/event.h | 7 ------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/core/include/thread_flags.h b/core/include/thread_flags.h index 5b80a72fec..096b5f78df 100644 --- a/core/include/thread_flags.h +++ b/core/include/thread_flags.h @@ -103,6 +103,13 @@ extern "C" { */ #define THREAD_FLAG_TIMEOUT (1u << 14) +/** + * @brief Thread flag use to notify available events in an event queue + * + * This flag is used by the `event` module. + */ +#define THREAD_FLAG_EVENT (1u << 13) + /** * @brief Comprehensive set of all predefined flags * @@ -114,7 +121,12 @@ extern "C" { * When using custom flags, asserting that they are not in this set can help * avoid conflict with future additions to the predefined flags. */ -#define THREAD_FLAG_PREDEFINED_MASK (THREAD_FLAG_MSG_WAITING | THREAD_FLAG_TIMEOUT) +#define THREAD_FLAG_PREDEFINED_MASK (\ + THREAD_FLAG_EVENT |\ + THREAD_FLAG_MSG_WAITING |\ + THREAD_FLAG_TIMEOUT\ + ) + /** @} */ /** diff --git a/sys/include/event.h b/sys/include/event.h index 02543ceeb9..068161fd0e 100644 --- a/sys/include/event.h +++ b/sys/include/event.h @@ -115,13 +115,6 @@ extern "C" { #endif -#ifndef THREAD_FLAG_EVENT -/** - * @brief Thread flag use to notify available events in an event queue - */ -#define THREAD_FLAG_EVENT (0x1) -#endif - /** * @brief event_queue_t static initializer */