riot_sys

Function event_sync

Source
pub unsafe extern "C" fn event_sync(queue: *mut event_queue_t)
Expand description

@brief Synchronize with the last event on the queue

Blocks until the last event on the queue at the moment of calling this is processed.

@warning May not be called from the event queue, as it would block forever. @warning If the queue has no waiter, this will block until the queue is claimed. See @ref event_queue_claim()

@param[in] queue event queue to sync with

Usage example:

event_post(queue, my_event);
// When event_sync() returns, my_event will have been processed.
event_sync(queue);