95 void* (*copy_constructor) (
void* value);
void _lf_free_token_copies(struct environment_t *env)
Free token copies made for mutable inputs. This function should be called at the beginning of each ti...
Definition lf_token.c:356
token_freed _lf_free_token(lf_token_t *token)
Free the specified token, if appropriate. If the reference count is greater than 0,...
Definition lf_token.c:155
lf_token_t * _lf_new_token(token_type_t *type, void *value, size_t length)
Return a new token with the specified type, value, and length. This will attempt to get one from the ...
Definition lf_token.c:194
void _lf_initialize_template(token_template_t *tmplt, size_t element_size)
Definition lf_token.c:243
lf_token_t * _lf_initialize_token(token_template_t *tmplt, size_t length)
Definition lf_token.c:284
token_freed _lf_done_using(lf_token_t *token)
Definition lf_token.c:343
lf_token_t * _lf_get_token(token_template_t *tmplt)
Definition lf_token.c:224
lf_token_t * lf_new_token(void *port_or_action, void *val, size_t len)
Return a new disassociated token with type matching the specified port or action and containing the s...
Definition lf_token.c:78
lf_token_t * lf_writable_copy(lf_port_base_t *port)
Definition lf_token.c:82
token_freed
Definition lf_token.h:74
@ TOKEN_AND_VALUE_FREED
Definition lf_token.h:78
@ TOKEN_FREED
Definition lf_token.h:77
@ NOT_FREED
Definition lf_token.h:75
@ VALUE_FREED
Definition lf_token.h:76
void _lf_replace_template_token(token_template_t *tmplt, lf_token_t *newtoken)
Replace the token in the specified template, if there is one, with a new one. If the new token is the...
Definition lf_token.c:327
lf_token_t * _lf_initialize_token_with_value(token_template_t *tmplt, void *value, size_t length)
Definition lf_token.c:273
lf_token_t * _lf_tokens_allocated_in_reactions
List of tokens created within reactions that must be freed. Tokens created by lf_writable_copy,...
Definition lf_token.c:51
int _lf_count_token_allocations
Definition lf_token.c:38
void _lf_free_all_tokens()
Free all tokens. Free tokens on the _lf_token_recycling_bin hashset and all template tokens.
Definition lf_token.c:292
Execution environment. This struct contains information about the execution environment....
Definition environment.h:68
Base type for ports. Port structs are customized types because their payloads are type specific....
Definition lf_token.h:162
lf_sparse_io_record_t * sparse_record
Definition lf_token.h:165
self_base_t * source_reactor
Definition lf_token.h:168
bool is_present
Definition lf_token.h:164
int destination_channel
Definition lf_token.h:166
int num_destinations
Definition lf_token.h:167
token_template_t tmplt
Definition lf_token.h:163
Definition lf_token.h:132
size_t capacity
Definition lf_token.h:134
size_t present_channels[]
Definition lf_token.h:135
int size
Definition lf_token.h:133
Definition lf_token.h:116
struct lf_token_t * next
Definition lf_token.h:126
size_t ref_count
Definition lf_token.h:124
size_t length
Definition lf_token.h:120
void * value
Definition lf_token.h:118
token_type_t * type
Definition lf_token.h:122
Definition lf_types.h:297
Base type for ports (lf_port_base_t) and actions (trigger_t), which can carry tokens....
Definition lf_token.h:143
lf_token_t * token
Definition lf_token.h:146
size_t length
Definition lf_token.h:147
token_type_t type
Definition lf_token.h:145
Type information for tokens. Specifically, this struct contains the fields needed to support token ty...
Definition lf_token.h:89
void(* destructor)(void *value)
Definition lf_token.h:93
size_t element_size
Definition lf_token.h:91