Skip to content

Commit

Permalink
info: fix ULTs stacks dump works only once
Browse files Browse the repository at this point in the history
1/one returned value must be tested instead of 0 to
detect that last "parked" XStream is done in
ABTI_info_check_print_all_thread_stacks() and thus
that print_stack_flag can be reset to PRINT_STACK_FLAG_UNSET
to allow for a next dump to be started.

DAOS-14248 ticket, Argobots issue pmodels#393.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
  • Loading branch information
bfaccini committed Aug 31, 2023
1 parent 36a41b5 commit 0c4d79c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,8 @@ void ABTI_info_check_print_all_thread_stacks(void)

/* Decrement the barrier value. */
int dec_value = ABTD_atomic_fetch_sub_int(&print_stack_barrier, 1);
if (dec_value == 0) {
/* previous value should be 1 ! */
if (dec_value == 1) {
/* The last execution stream resets the flag. */
ABTD_atomic_release_store_int(&print_stack_flag,
PRINT_STACK_FLAG_UNSET);
Expand Down

0 comments on commit 0c4d79c

Please sign in to comment.