Common scheduler parameters.
More...
#include <stdbool.h>
#include <stddef.h>
Go to the source code of this file.
|
typedef struct lf_scheduler_t | lf_scheduler_t |
| Paramters used in schedulers of the threaded reactor C runtime.
|
|
Common scheduler parameters.
- Author
- Soroush Bateni
-
Edward A. Lee
- Copyright
- (c) 2022-2024, The University of Texas at Dallas and The University of California at Berkeley. License: BSD 2-clause
This file defines data types and functions that are common across multiple schedulers.
◆ DEFAULT_MAX_REACTION_LEVEL
#define DEFAULT_MAX_REACTION_LEVEL 100 |
◆ NUMBER_OF_WORKERS
#define NUMBER_OF_WORKERS 1 |
◆ lf_scheduler_t
typedef struct lf_scheduler_t lf_scheduler_t |
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.
◆ init_sched_instance()
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.
- Parameters
-
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. |
- Returns
true
if initialization was performed. false
if instance is already initialized (checked in a thread-safe way).