62#if (CH_CFG_USE_EVENTS == TRUE) || defined(__DOXYGEN__)
170 if (p->
next == elp) {
256 return flags & elp->
wflags;
280 return flags & elp->
wflags;
405 chDbgAssert(handlers[eid] != NULL,
"null handler");
413#if (CH_CFG_OPTIMIZE_SPEED == TRUE) || \
414 (CH_CFG_USE_EVENTS_TIMEOUT == FALSE) || \
494 if ((currtp->
epending & events) != events) {
505#if (CH_CFG_USE_EVENTS_TIMEOUT == TRUE) || defined(__DOXYGEN__)
616 if ((currtp->
epending & events) != events) {
ChibiOS/RT main include file.
#define chDbgAssert(c, r)
Condition assertion.
#define chDbgCheck(c)
Function parameters check.
#define chDbgCheckClassI()
void(* evhandler_t)(eventid_t id)
Event Handler callback function.
void chEvtSignalI(thread_t *tp, eventmask_t events)
Adds a set of event flags directly to the specified thread_t.
struct event_source event_source_t
Event Source structure.
void chEvtRegisterMaskWithFlagsI(event_source_t *esp, event_listener_t *elp, eventmask_t events, eventflags_t wflags)
Registers an Event Listener on an Event Source.
void chEvtUnregister(event_source_t *esp, event_listener_t *elp)
Unregisters an Event Listener from its Event Source.
void chEvtSignal(thread_t *tp, eventmask_t events)
Adds a set of event flags directly to the specified thread_t.
eventmask_t chEvtWaitAllTimeout(eventmask_t events, sysinterval_t timeout)
Waits for all the specified events.
void chEvtBroadcastFlagsI(event_source_t *esp, eventflags_t flags)
Signals all the Event Listeners registered on the specified Event Source.
#define chEvtWaitOne(mask)
eventmask_t chEvtGetAndClearEvents(eventmask_t events)
Clears the pending events specified in the events mask.
static eventmask_t chEvtAddEventsI(eventmask_t events)
Adds (OR) a set of events to the current thread, this is much faster than using chEvtBroadcast() or c...
eventmask_t chEvtWaitOneTimeout(eventmask_t events, sysinterval_t timeout)
Waits for exactly one of the specified events.
eventmask_t chEvtWaitAnyTimeout(eventmask_t events, sysinterval_t timeout)
Waits for any of the specified events.
eventflags_t chEvtGetAndClearFlags(event_listener_t *elp)
Returns the flags associated to an event_listener_t.
#define EVENT_MASK(eid)
Returns an event mask from an event identifier.
struct event_listener event_listener_t
void chEvtDispatch(const evhandler_t *handlers, eventmask_t events)
Invokes the event handlers associated to an event flags mask.
eventmask_t chEvtGetAndClearEventsI(eventmask_t events)
Clears the pending events specified in the events mask.
void chEvtRegisterMaskWithFlags(event_source_t *esp, event_listener_t *elp, eventmask_t events, eventflags_t wflags)
Registers an Event Listener on an Event Source.
eventmask_t chEvtAddEvents(eventmask_t events)
Adds (OR) a set of events to the current thread, this is much faster than using chEvtBroadcast() or c...
void chEvtBroadcastFlags(event_source_t *esp, eventflags_t flags)
Signals all the Event Listeners registered on the specified Event Source.
eventflags_t chEvtGetAndClearFlagsI(event_listener_t *elp)
Returns the unmasked flags associated to an event_listener_t.
#define chEvtWaitAll(mask)
#define chEvtWaitAny(mask)
struct ch_thread thread_t
Type of a thread structure.
void chSchRescheduleS(void)
Performs a reschedule if a higher priority thread is runnable.
#define MSG_OK
Normal wakeup message.
thread_t * chSchReadyI(thread_t *tp)
Inserts a thread in the Ready List placing it behind its peers.
void chSchGoSleepS(tstate_t newstate)
Puts the current thread to sleep into the specified state.
#define CH_STATE_WTOREVT
One event.
#define CH_STATE_WTANDEVT
Several events.
msg_t chSchGoSleepTimeoutS(tstate_t newstate, sysinterval_t timeout)
Puts the current thread to sleep into the specified state with timeout specification.
static void chSysLock(void)
Enters the kernel lock state.
static void chSysUnlock(void)
Leaves the kernel lock state.
static thread_t * chThdGetSelfX(void)
Returns a pointer to the current thread_t.
#define TIME_IMMEDIATE
Zero interval specification for some functions with a timeout specification.
uint64_t sysinterval_t
Type of time interval.
msg_t rdymsg
Thread wakeup code.
eventmask_t epending
Pending events mask.
tstate_t state
Current thread state.
eventmask_t ewmask
Enabled events mask.
union ch_thread::@250330312022121344252011223135034045240103044261 u
State-specific fields.
eventmask_t events
Events to be set in the listening thread.
event_listener_t * next
Next Event Listener registered on the event source.
eventflags_t wflags
Flags that this listener interested in.
eventflags_t flags
Flags added to the listener by the event source.
thread_t * listener
Thread interested in the event source.
event_listener_t * next
First Event Listener registered on the Event Source.