Skip to content

Commit

Permalink
Clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
byeonggiljun committed Jun 17, 2024
1 parent 07f2aa8 commit 349fb9a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
16 changes: 8 additions & 8 deletions core/threaded/reactor_threaded.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,14 +880,14 @@ void _lf_worker_do_work(environment_t* env, int worker_number) {
worker_number, current_reaction_to_execute->name, LF_LEVEL(current_reaction_to_execute->index),
current_reaction_to_execute->is_an_input_reaction, current_reaction_to_execute->deadline);

#ifdef FEDERATED_CENTRALIZED
if (current_reaction_to_execute->is_an_input_reaction) {
// This federate has received a tagged message with the current tag and
// must send LTC at the current tag to confirm that the federate has successfully
// received and processed tagged messages with the current tag.
env->need_to_send_LTC = true;
}
#endif // FEDERATED_CENTRALIZED
#ifdef FEDERATED_CENTRALIZED
if (current_reaction_to_execute->is_an_input_reaction) {
// This federate has received a tagged message with the current tag and
// must send LTC at the current tag to confirm that the federate has successfully
// received and processed tagged messages with the current tag.
env->need_to_send_LTC = true;
}
#endif // FEDERATED_CENTRALIZED

bool violation = _lf_worker_handle_violations(env, worker_number, current_reaction_to_execute);

Expand Down
2 changes: 1 addition & 1 deletion include/core/environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ typedef struct environment_t {
#if defined(FEDERATED)
tag_t** _lf_intended_tag_fields;
int _lf_intended_tag_fields_size;
#endif // FEDERATED
#endif // FEDERATED
#if defined(FEDERATED_CENTRALIZED)
bool need_to_send_LTC;
#endif // FEDERATED_CENTRALIZED
Expand Down
6 changes: 2 additions & 4 deletions tag/api/tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@
#define NEVER_TAG \
(tag_t) { .time = NEVER, .microstep = NEVER_MICROSTEP }
// Need a separate initializer expression to comply with some C compilers
#define NEVER_TAG_INITIALIZER \
{ NEVER, NEVER_MICROSTEP }
#define NEVER_TAG_INITIALIZER {NEVER, NEVER_MICROSTEP}
#define FOREVER_TAG \
(tag_t) { .time = FOREVER, .microstep = FOREVER_MICROSTEP }
// Need a separate initializer expression to comply with some C compilers
#define FOREVER_TAG_INITIALIZER \
{ FOREVER, FOREVER_MICROSTEP }
#define FOREVER_TAG_INITIALIZER {FOREVER, FOREVER_MICROSTEP}
#define ZERO_TAG \
(tag_t) { .time = 0LL, .microstep = 0u }

Expand Down

0 comments on commit 349fb9a

Please sign in to comment.