Skip to content

Commit

Permalink
sys/event: add event thread flag to THREAD_FLAG_PREDEFINED_MASK
Browse files Browse the repository at this point in the history
  • Loading branch information
Enoch247 committed Sep 20, 2024
1 parent 76c9059 commit d958512
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
14 changes: 13 additions & 1 deletion core/include/thread_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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\
)

/** @} */

Check warning on line 131 in core/include/thread_flags.h

View workflow job for this annotation

GitHub Actions / static-tests

Uncrustify proposes the following patch: --- a/core/include/thread_flags.h +++ b/core/include/thread_flags.h @@ -121,11 +121,11 @@ 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_EVENT |\ - THREAD_FLAG_MSG_WAITING |\ - THREAD_FLAG_TIMEOUT\ - ) +#define THREAD_FLAG_PREDEFINED_MASK ( \ + THREAD_FLAG_EVENT | \ + THREAD_FLAG_MSG_WAITING | \ + THREAD_FLAG_TIMEOUT \ + ) /** @} */
/**
Expand Down
7 changes: 0 additions & 7 deletions sys/include/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit d958512

Please sign in to comment.