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

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

#include <scheduler_instance.h>

Data Fields

struct environment_tenv
 
size_t max_reaction_level
 Maximum number of levels for reactions in the program.
 
volatile bool should_stop
 Indicate whether the program should stop.
 
volatile int * indexes
 An array of atomic indexes.
 
void * transfer_reactions
 Hold reactions temporarily.
 
size_t number_of_workers
 Number of workers that this scheduler is managing.
 
volatile size_t number_of_idle_workers
 Number of workers that are idle. Adding to/subtracting from this variable must be done atomically.
 
custom_scheduler_data_tcustom_data
 

Detailed Description

Paramters 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

◆ env

struct environment_t* lf_scheduler_t::env

◆ 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: