Skip to content

Commit

Permalink
workload-xsave: yogini.c bug fix
Browse files Browse the repository at this point in the history
1. A logic error caused the program to not run properly and has been fixed.

Signed-off-by: Haoliang Zhu<[email protected]>
  • Loading branch information
haoliang-Zhu authored and ysun committed Feb 23, 2024
1 parent fc6aa02 commit d601018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions workload-xsave/yogini.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static void start_and_wait_for_workers(void)
}

/* create workers */
for (wi = first_worker, i = 0; !wi; wi = wi->next, i++) {
for (wi = first_worker, i = 0; wi; wi = wi->next, i++) {
futex_ptr[i] = FUTEX_VAL;
thread_done[i] = false;
wi->thread_number = i;
Expand Down Expand Up @@ -526,7 +526,7 @@ static void start_and_wait_for_workers(void)
}

/* wait for all workers to join */
for (wi = first_worker, i = 0; !wi; wi = wi->next, ++i)
for (wi = first_worker, i = 0; wi; wi = wi->next, ++i)
if (pthread_join(tid_ptr[i], NULL) != 0)
err(0, "thread %ld failed to join\n", wi->thread_id);
}
Expand Down

0 comments on commit d601018

Please sign in to comment.