12#ifndef LF_SCHEDULER_PARAMS_H
13#define LF_SCHEDULER_PARAMS_H
15#ifndef NUMBER_OF_WORKERS
16#define NUMBER_OF_WORKERS 1
22#define DEFAULT_MAX_REACTION_LEVEL 100
struct custom_scheduler_data_t custom_scheduler_data_t
Definition scheduler_instance.h:26
bool init_sched_instance(struct environment_t *env, lf_scheduler_t **instance, size_t number_of_workers, sched_params_t *params)
Initialize instance using the provided information.
Execution environment.
Definition environment.h:52
Parameters used in schedulers of the threaded reactor C runtime.
Definition scheduler_instance.h:35
volatile size_t number_of_idle_workers
Number of workers that are idle.
Definition scheduler_instance.h:74
size_t number_of_workers
Number of workers that this scheduler is managing.
Definition scheduler_instance.h:67
struct environment_t * env
Pointer to the environment.
Definition scheduler_instance.h:39
size_t max_reaction_level
Maximum number of levels for reactions in the program.
Definition scheduler_instance.h:44
volatile int * indexes
An array of atomic indexes.
Definition scheduler_instance.h:57
volatile bool should_stop
Indicate whether the program should stop.
Definition scheduler_instance.h:49
custom_scheduler_data_t * custom_data
Pointer to an optional custom data structure that each scheduler can define.
Definition scheduler_instance.h:82
void * transfer_reactions
Hold reactions temporarily.
Definition scheduler_instance.h:62
Struct representing the most common scheduler parameters.
Definition scheduler_instance.h:89
size_t num_reactions_per_level_size
The size of the num_reactions_per_level array.
Definition scheduler_instance.h:107
size_t * num_reactions_per_level
An array of non-negative integers, where each element represents a reaction level.
Definition scheduler_instance.h:99