Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
erlingrj committed Jan 15, 2025
1 parent 42fc1ad commit 9fee19b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion examples/posix/hello/hello.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
LF_DEFINE_REACTION_BODY(TimerSource, r) {
LF_SCOPE_SELF(TimerSource);
LF_SCOPE_ENV();
printf("TimerSource World @ %lld\n", env->get_elapsed_logical_time(env));
printf("TimerSource World @ %"PRId64"\n", env->get_elapsed_logical_time(env));
}

int main() {
Expand Down
42 changes: 21 additions & 21 deletions include/reactor-uc/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -653,35 +653,35 @@ typedef struct FederatedInputConnection FederatedInputConnection;

#define LF_ENTRY_POINT(MainReactorName, Timeout, KeepAlive, Fast) \
MainReactorName main_reactor; \
Environment env; \
void lf_exit(void) { Environment_free(&env); } \
Environment _lf_environment; \
void lf_exit(void) { Environment_free(&_lf_environment); } \
void lf_start() { \
Environment_ctor(&env, (Reactor *)&main_reactor); \
MainReactorName##_ctor(&main_reactor, NULL, &env); \
env.scheduler->duration = Timeout; \
env.scheduler->keep_alive = KeepAlive; \
env.fast_mode = Fast; \
env.assemble(&env); \
env.start(&env); \
Environment_ctor(&_lf_environment, (Reactor *)&main_reactor); \
MainReactorName##_ctor(&main_reactor, NULL, &_lf_environment); \
_lf_environment.scheduler->duration = Timeout; \
_lf_environment.scheduler->keep_alive = KeepAlive; \
_lf_environment.fast_mode = Fast; \
_lf_environment.assemble(&_lf_environment); \
_lf_environment.start(&_lf_environment); \
lf_exit(); \
}

#define LF_ENTRY_POINT_FEDERATED(FederateName, Timeout, KeepAlive, HasInputs, NumBundles, IsLeader) \
FederateName main_reactor; \
Environment env; \
void lf_exit(void) { Environment_free(&env); } \
Environment _lf_environment; \
void lf_exit(void) { Environment_free(&_lf_environment); } \
void lf_start() { \
Environment_ctor(&env, (Reactor *)&main_reactor); \
env.scheduler->duration = Timeout; \
env.scheduler->keep_alive = KeepAlive; \
env.scheduler->leader = IsLeader; \
env.has_async_events = HasInputs; \
Environment_ctor(&_lf_environment, (Reactor *)&main_reactor); \
_lf_environment.scheduler->duration = Timeout; \
_lf_environment.scheduler->keep_alive = KeepAlive; \
_lf_environment.scheduler->leader = IsLeader; \
_lf_environment.has_async_events = HasInputs; \
\
FederateName##_ctor(&main_reactor, NULL, &env); \
env.net_bundles_size = NumBundles; \
env.net_bundles = (FederatedConnectionBundle **)&main_reactor._bundles; \
env.assemble(&env); \
env.start(&env); \
FederateName##_ctor(&main_reactor, NULL, &_lf_environment); \
_lf_environment.net_bundles_size = NumBundles; \
_lf_environment.net_bundles = (FederatedConnectionBundle **)&main_reactor._bundles; \
_lf_environment.assemble(&_lf_environment); \
_lf_environment.start(&_lf_environment); \
lf_exit(); \
}

Expand Down

0 comments on commit 9fee19b

Please sign in to comment.