ssm
0.0.2
Runtime Library for the Sparse Synchronous Model
|
A scheduled variable that supports scheduled updates with triggers. More...
#include <ssm.h>
Data Fields | |
struct ssm_mm | mm |
ssm_time_t | later_time |
When the variable should be next updated. More... | |
ssm_time_t | last_updated |
When the variable was last updated. More... | |
ssm_trigger_t * | triggers |
List of sensitive continuations. More... | |
ssm_value_t | value |
Current value. More... | |
ssm_value_t | later_value |
Buffered value for delayed assignment. More... | |
A scheduled variable that supports scheduled updates with triggers.
Scheduled variables are heap-allocated built-in types that represent variables with reference-like semantics in SSM. These should be always allocated on the heap using ssm_new_sv().
Routines may directly assign to them in the current instant (ssm_assign()), or schedule a delayed assignment to them (ssm_later()). The last_updated time is recorded in each case, sensitive routines, i.e., triggers, are woken up.
At most one delayed assignment may be scheduled at a time, but a single update may wake any number of sensitive routines.
ssm_sv_t v
, v.mm.kind == SSM_SV_K
. ssm_time_t later_time |
ssm_time_t last_updated |
ssm_trigger_t* triggers |
ssm_value_t value |
ssm_value_t later_value |