73 void* (*copy_constructor)(
void* value);
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:165
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:204
struct token_type_t token_type_t
Type information for tokens. Specifically, this struct contains the fields needed to support token ty...
void _lf_initialize_template(token_template_t *tmplt, size_t element_size)
Definition lf_token.c:256
lf_token_t * _lf_initialize_token(token_template_t *tmplt, size_t length)
Definition lf_token.c:298
token_freed _lf_done_using(lf_token_t *token)
Definition lf_token.c:353
lf_token_t * _lf_get_token(token_template_t *tmplt)
Definition lf_token.c:239
struct lf_port_base_t lf_port_base_t
Base type for ports. Port structs are customized types because their payloads are type specific....
struct lf_token_t lf_token_t
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:72
struct lf_sparse_io_record_t lf_sparse_io_record_t
lf_token_t * lf_writable_copy(lf_port_base_t *port)
Definition lf_token.c:76
void _lf_free_token_copies(void)
Free token copies made for mutable inputs. This function should be called at the beginning of each ti...
Definition lf_token.c:366
token_freed
Definition lf_token.h:52
@ TOKEN_AND_VALUE_FREED
Definition lf_token.h:56
@ TOKEN_FREED
Definition lf_token.h:55
@ NOT_FREED
Definition lf_token.h:53
@ VALUE_FREED
Definition lf_token.h:54
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:337
lf_token_t * _lf_initialize_token_with_value(token_template_t *tmplt, void *value, size_t length)
Definition lf_token.c:282
struct token_template_t token_template_t
Base type for ports (lf_port_base_t) and actions (trigger_t), which can carry tokens....
int _lf_count_token_allocations
Definition lf_token.c:15
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:306
Execution environment. This struct contains information about the execution environment....
Definition environment.h:49
Base type for ports. Port structs are customized types because their payloads are type specific....
Definition lf_token.h:140
lf_sparse_io_record_t * sparse_record
Definition lf_token.h:143
self_base_t * source_reactor
Definition lf_token.h:146
bool is_present
Definition lf_token.h:142
int destination_channel
Definition lf_token.h:144
int num_destinations
Definition lf_token.h:145
token_template_t tmplt
Definition lf_token.h:141
Definition lf_token.h:110
size_t capacity
Definition lf_token.h:112
int size
Definition lf_token.h:111
size_t * present_channels
Definition lf_token.h:113
struct lf_token_t * next
Definition lf_token.h:104
size_t ref_count
Definition lf_token.h:102
size_t length
Definition lf_token.h:98
void * value
Definition lf_token.h:96
token_type_t * type
Definition lf_token.h:100
The base type for all reactor self structs.
Definition lf_types.h:276
Base type for ports (lf_port_base_t) and actions (trigger_t), which can carry tokens....
Definition lf_token.h:121
lf_token_t * token
Definition lf_token.h:124
size_t length
Definition lf_token.h:125
token_type_t type
Definition lf_token.h:123
Type information for tokens. Specifically, this struct contains the fields needed to support token ty...
Definition lf_token.h:67
void(* destructor)(void *value)
Definition lf_token.h:71
size_t element_size
Definition lf_token.h:69