ssm
0.0.2
Runtime Library for the Sparse Synchronous Model
|
The internal interface of the SSM runtime. More...
Go to the source code of this file.
Data Structures | |
struct | ssm_mem_statistics_pool |
Statistics for a heap page pool; used in ssm_mem_statistics_t. More... | |
struct | ssm_mem_statistics |
Statistics for the heap; filled with ssm_mem_statistics_collect(). More... | |
Macros | |
#define | SSM_ASSERT(cond) |
Throw an internal error. More... | |
#define | SSM_MEM_POOL_MIN 16 |
Block size of the smallest memory pool. More... | |
#define | SSM_MEM_POOL_FACTOR_BASE2 2 |
Factor between each successive memory pool size, in base 2. More... | |
#define | SSM_MEM_POOL_COUNT 4 |
Number of memory pools. More... | |
#define | SSM_MEM_POOL_SIZE(pool) (SSM_MEM_POOL_MIN << (SSM_MEM_POOL_FACTOR_BASE2 * pool)) |
Compute the size of a memory pool. More... | |
#define | SSM_MEM_POOL_MAX SSM_MEM_POOL_SIZE(SSM_MEM_POOL_COUNT - 1) |
The size of the largest memory pool. More... | |
#define | SSM_MEM_PAGE_SIZE SSM_MEM_POOL_SIZE(SSM_MEM_POOL_COUNT) |
The size of a memory page; must be greater than SSM_MEM_POOL_MAX. More... | |
Typedefs | |
typedef struct ssm_mem_statistics_pool | ssm_mem_statistics_pool_t |
Statistics for a heap page pool; used in ssm_mem_statistics_t. More... | |
typedef struct ssm_mem_statistics | ssm_mem_statistics_t |
Statistics for the heap; filled with ssm_mem_statistics_collect(). More... | |
Functions | |
ssm_time_t | ssm_next_event_time (void) |
The time of the next event in the event queue. More... | |
bool | ssm_active (void) |
Whether there are still active processes in the activation queue. More... | |
void | ssm_reset (void) |
Reset the scheduler. More... | |
void | ssm_set_now (ssm_time_t next) |
Advance the current model time. More... | |
void | ssm_update (ssm_sv_t *sv) |
Perform a (delayed) update on a variable. More... | |
void | ssm_unschedule (ssm_sv_t *var) |
Unschedule any pending events on a variable. More... | |
void | ssm_tick (void) |
Run the system for the next scheduled instant. More... | |
void | ssm_mem_init (void *(*alloc_page_handler)(void), void *(*alloc_mem_handler)(size_t), void(*free_mem_handler)(void *, size_t)) |
Initializes the underlying allocator system. More... | |
void | ssm_mem_destroy (void(*free_page_handler)(void *)) |
Tears down the underlying allocator system. More... | |
void | ssm_mem_statistics_collect (ssm_mem_statistics_t *stats) |
Collect and return statistics about the heap. More... | |
The internal interface of the SSM runtime.
This header file contains definitions and declarations that should not be exposed to user code.
Definition in file ssm-internal.h.