ssm  0.0.2
Runtime Library for the Sparse Synchronous Model
ssm_sv Struct Reference

A scheduled variable that supports scheduled updates with triggers. More...

#include <ssm.h>

+ Collaboration diagram for ssm_sv:

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_ttriggers
 List of sensitive continuations. More...
 
ssm_value_t value
 Current value. More...
 
ssm_value_t later_value
 Buffered value for delayed assignment. More...
 

Detailed Description

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.

Invariant
later_time != SSM_NEVER iff this variable in the event queue.
for all ssm_sv_t v, v.mm.kind == SSM_SV_K.

Definition at line 588 of file ssm.h.

Field Documentation

◆ mm

struct ssm_mm mm

Definition at line 495 of file ssm.h.

◆ later_time

ssm_time_t later_time

When the variable should be next updated.

Definition at line 590 of file ssm.h.

◆ last_updated

ssm_time_t last_updated

When the variable was last updated.

Definition at line 591 of file ssm.h.

◆ triggers

ssm_trigger_t* triggers

List of sensitive continuations.

Definition at line 592 of file ssm.h.

◆ value

ssm_value_t value

Current value.

Definition at line 593 of file ssm.h.

◆ later_value

ssm_value_t later_value

Buffered value for delayed assignment.

Definition at line 594 of file ssm.h.


The documentation for this struct was generated from the following file: