reactor-c
C Runtime for Lingua Franca
|
Common scheduler functions. More...
#include <assert.h>
#include "scheduler_instance.h"
#include "environment.h"
#include "reactor.h"
#include "lf_types.h"
#include "util.h"
Functions | |
bool | init_sched_instance (environment_t *env, lf_scheduler_t **instance, size_t number_of_workers, sched_params_t *params) |
Initialize instance using the provided information. | |
Common scheduler functions.
This file defines functions that are common across multiple schedulers.
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.
No-op if instance
is already initialized (i.e., not NULL). This function assumes that mutex is allowed to be recursively locked.
instance | The lf_scheduler_t object to initialize. |
number_of_workers | Number of workers in the program. |
params | Reference to scheduler parameters in the form of a sched_params_t . Can be NULL. |
true
if initialization was performed. false
if instance is already initialized (checked in a thread-safe way).