![]() |
reactor-c 1.0
C Runtime for Lingua Franca
|
State of a pending lf_async() call. More...
#include <reactor.h>
Data Fields | |
| lf_action_base_t * | action |
| The action that resumes this call, or NULL for lf_await(), which is resumed by lf_await_resume(). | |
| bool | event_pending |
| True if this call scheduled the logical action for resume_tag. | |
| bool | function_done |
| Set to true in _lf_async_end(), once the invoked function has returned. | |
| bool | left_pool |
| True if the calling thread left the pool of worker threads. | |
| struct lf_async_state_t * | next |
| Next pending call in the environment, or NULL. | |
| lf_port_base_t * | port |
| The input port passed to lf_await(), or NULL for lf_async(). | |
| reaction_t * | reaction |
| The reaction that invoked lf_async(). | |
| tag_t | resume_tag |
| Tag at which a logical action resumes this call. | |
| bool | resume_waiting |
| Set to true by lf_async_resume() when it is waiting for function_done. | |
| bool | resumed |
| Set to true when the call has been resumed. | |
| lf_cond_t | resumed_cond |
| Signaled when resumed becomes true. | |
| self_base_t * | self |
| The reactor whose reaction invoked lf_async(). | |
State of a pending lf_async() call.
An instance of this struct lives on the stack of the reaction that invoked lf_async(). While the call is waiting to be resumed, the instance is linked into the list of pending calls of the environment (see environment_t::async_waiters). All fields other than resumed_cond are protected by the environment mutex once the instance is on that list.
| lf_action_base_t* lf_async_state_t::action |
The action that resumes this call, or NULL for lf_await(), which is resumed by lf_await_resume().
A physical action is scheduled in _lf_async_end().
| bool lf_async_state_t::event_pending |
True if this call scheduled the logical action for resume_tag.
A later call for the same action and tag leaves this false and does not schedule another event.
| bool lf_async_state_t::function_done |
Set to true in _lf_async_end(), once the invoked function has returned.
| bool lf_async_state_t::left_pool |
True if the calling thread left the pool of worker threads.
This is false if the program was already stopping when the call began, in which case the call does not suspend at all.
| struct lf_async_state_t* lf_async_state_t::next |
Next pending call in the environment, or NULL.
| lf_port_base_t* lf_async_state_t::port |
The input port passed to lf_await(), or NULL for lf_async().
| reaction_t* lf_async_state_t::reaction |
The reaction that invoked lf_async().
Restored as the executing reaction upon resumption.
| tag_t lf_async_state_t::resume_tag |
Tag at which a logical action resumes this call.
FOREVER_TAG for a physical action and for lf_await(). Several calls that share one logical action and the same tag share one event.
| bool lf_async_state_t::resume_waiting |
Set to true by lf_async_resume() when it is waiting for function_done.
| bool lf_async_state_t::resumed |
Set to true when the call has been resumed.
| lf_cond_t lf_async_state_t::resumed_cond |
Signaled when resumed becomes true.
Associated with the environment mutex.
| self_base_t* lf_async_state_t::self |
The reactor whose reaction invoked lf_async().