Skip to content

Commit

Permalink
A small adjustment.
Browse files Browse the repository at this point in the history
This looks like a bugfix, but I am not sure that it is. In any case it
does not fix the bug that Jacky reported. This change is just made
because it seems related and because with this change the code looks
more likely to be correct.
  • Loading branch information
petervdonovan committed Aug 8, 2023
1 parent ccf230f commit 1349523
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/federated/federate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,7 @@ void update_max_level(tag_t tag, bool is_provisional) {
environment_t *env;
_lf_get_environments(&env);
max_level_allowed_to_advance = INT_MAX;
LF_PRINT_DEBUG("last_TAG=" PRINTF_TIME, tag.time);
LF_PRINT_DEBUG("last_TAG=" PRINTF_TIME ", %lld, (%d)", tag.time, (long long) tag.microstep, (int) is_provisional);
if ((lf_tag_compare(env->current_tag, tag) < 0) || (
lf_tag_compare(env->current_tag, tag) == 0 && !is_provisional
)) {
Expand Down
2 changes: 1 addition & 1 deletion core/threaded/reactor_threaded.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ void _lf_next_locked(environment_t *env) {
// federates. If an action triggers during that wait, it will unblock
// and return with a time (typically) less than the next_time.
tag_t grant_tag = send_next_event_tag(env, next_tag, true); // true means this blocks.
while (lf_tag_compare(grant_tag, next_tag) < 0) {
while (lf_tag_compare(grant_tag, env->current_tag) <= 0) {
next_tag = get_next_event_tag(env);
grant_tag = send_next_event_tag(env, next_tag, true);
}
Expand Down

0 comments on commit 1349523

Please sign in to comment.