reactor-c 1.0
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
lf_scheduler_t Struct Reference

Parameters used in schedulers of the threaded reactor C runtime. More...

#include <scheduler_instance.h>

Data Fields

custom_scheduler_data_tcustom_data
 Pointer to an optional custom data structure that each scheduler can define.
struct environment_tenv
 Pointer to the environment.
volatile int * indexes
 An array of atomic indexes.
size_t max_reaction_level
 Maximum number of levels for reactions in the program.
volatile size_t number_of_idle_workers
 Number of workers that are idle.
size_t number_of_workers
 Number of workers that this scheduler is managing.
volatile bool should_stop
 Indicate whether the program should stop.
void * transfer_reactions
 Hold reactions temporarily.

Detailed Description

Parameters used in schedulers of the threaded reactor C runtime.

Note
Members of this struct are added based on existing schedulers' needs. These should be expanded to accommodate new schedulers.

Field Documentation

◆ custom_data

custom_scheduler_data_t* lf_scheduler_t::custom_data

Pointer to an optional custom data structure that each scheduler can define.

The type is forward declared here and must be declared again in the scheduler source file Is not touched by init_sched_instance and must be initialized by each scheduler that needs it

◆ env

struct environment_t* lf_scheduler_t::env

Pointer to the environment.

◆ indexes

volatile int* lf_scheduler_t::indexes

An array of atomic indexes.

Can be used to avoid race conditions. Schedulers are allowed to to use as many indexes as they deem fit.

◆ max_reaction_level

size_t lf_scheduler_t::max_reaction_level

Maximum number of levels for reactions in the program.

◆ number_of_idle_workers

volatile size_t lf_scheduler_t::number_of_idle_workers

Number of workers that are idle.

Adding to/subtracting from this variable must be done atomically.

◆ number_of_workers

size_t lf_scheduler_t::number_of_workers

Number of workers that this scheduler is managing.

◆ should_stop

volatile bool lf_scheduler_t::should_stop

Indicate whether the program should stop.

◆ transfer_reactions

void* lf_scheduler_t::transfer_reactions

Hold reactions temporarily.


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