Loading...
Searching...
No Matches
thread_flags.h File Reference

Thread Flags API. More...

Detailed Description

Thread Flags API.

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file thread_flags.h.

#include "sched.h"
+ Include dependency graph for thread_flags.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef uint16_t thread_flags_t
 Type definition of thread_flags_t.
 

Functions

void thread_flags_set (thread_t *thread, thread_flags_t mask)
 Set thread flags, possibly waking it up.
 
thread_flags_t thread_flags_clear (thread_flags_t mask)
 Clear current thread's flags.
 
thread_flags_t thread_flags_wait_any (thread_flags_t mask)
 Wait for any flag in mask to become set (blocking)
 
thread_flags_t thread_flags_wait_all (thread_flags_t mask)
 Wait for all flags in mask to become set (blocking)
 
thread_flags_t thread_flags_wait_one (thread_flags_t mask)
 Wait for any flags in mask to become set (blocking), one at a time.
 
int thread_flags_wake (thread_t *thread)
 Possibly Wake up thread waiting for flags.
 

reserved thread flags

#define THREAD_FLAG_MSG_WAITING   (1u << 15)
 Set when a message becomes available.
 
#define THREAD_FLAG_TIMEOUT   (1u << 14)
 Set by xtimer_set_timeout_flag() when the timer expires.
 
#define THREAD_FLAG_PREDEFINED_MASK   (THREAD_FLAG_MSG_WAITING | THREAD_FLAG_TIMEOUT)
 Comprehensive set of all predefined flags.