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

The struct template of a heap-allocated closure object. More...

#include <ssm.h>

+ Collaboration diagram for ssm_closure1:

Data Fields

struct ssm_mm mm
 Memory management header. More...
 
ssm_func_t f
 Enter function pointer. More...
 
ssm_value_t argv [1]
 An array of arguments. More...
 

Detailed Description

The struct template of a heap-allocated closure object.

This struct is meant to be used as a template for performing other closure-related pointer arithmetic; no instance of this should ever be declared. See elaborated discussion about this pattern for ssm_adt1.

A closure should always be allocated with enough space in argv to accommodate all arguments expected by the enter function f, so faciliate efficient in-place usage.

The current number of arguments owned by the closure is tracked by the memory management header's val_count field; the reference counts of the argv fields within this range need to be decremented when the enclosing closure is freed. The total number of arguments accommodated by the closure is tracked by the tag field; this also determines the size of the closure object.

Definition at line 804 of file ssm.h.

Field Documentation

◆ mm

struct ssm_mm mm

Memory management header.

Definition at line 594 of file ssm.h.

◆ f

Enter function pointer.

Definition at line 806 of file ssm.h.

◆ argv

ssm_value_t argv[1]

An array of arguments.

Definition at line 807 of file ssm.h.


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