|
Serene Runtime 1.0.0-dev
C runtime for the Serene programming language
|
#include <serene/rt/context.h>#include <serene/rt/engine.h>#include <serene/rt/fiber.h>#include <serene/rt/mm/interface.h>#include <serene/utils.h>Go to the source code of this file.
Macros | |
| #define | SERENE_RUNTIME_INIT(engine, config) |
| Declare engine and bring the runtime up, the memory manager first, then the engine over it, both reading config (a const srn_configuration_t
*; null means the defaults). | |
| #define | SERENE_RUNTIME_INIT_WITH_SCHED(engine, sched, config) |
| SERENE_RUNTIME_INIT plus a sched variable bound to the engine's scheduler, which every run and fiber call wants at hand. | |
| #define | SERENE_RUNTIME_SHUTDOWN(engine) |
| Tear down what SERENE_RUNTIME_INIT brought up, in reverse order, the engine (reactor, scheduler, jit) and then the memory manager it lives in. | |
| #define SERENE_RUNTIME_INIT | ( | engine, | |
| config ) |
Declare engine and bring the runtime up, the memory manager first, then the engine over it, both reading config (a const srn_configuration_t *; null means the defaults).
config is evaluated more than once, so pass a plain pointer, not an expression with effects. Panics on failure.
Definition at line 38 of file runtime.h.
| #define SERENE_RUNTIME_INIT_WITH_SCHED | ( | engine, | |
| sched, | |||
| config ) |
SERENE_RUNTIME_INIT plus a sched variable bound to the engine's scheduler, which every run and fiber call wants at hand.
Definition at line 46 of file runtime.h.
| #define SERENE_RUNTIME_SHUTDOWN | ( | engine | ) |
Tear down what SERENE_RUNTIME_INIT brought up, in reverse order, the engine (reactor, scheduler, jit) and then the memory manager it lives in.
Contexts need no separate release beforehand; the manager reclaims every chain. Release a context earlier only to reclaim its memory early, and only when no unreaped fiber lives in it.
Definition at line 58 of file runtime.h.