Skip to content

Commit

Permalink
stress-yield: add LIKELY/UNLIKELY hints for stress_continue_flag
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Ian King <[email protected]>
  • Loading branch information
ColinIanKing committed Feb 13, 2025
1 parent c959ac2 commit 335b2e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stress-yield.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static int stress_yield(stress_args_t *args)
stress_sync_start_wait(args);
stress_set_proc_state(args->name, STRESS_STATE_RUN);

for (i = 0; stress_continue_flag() && (i < yielders); i++) {
for (i = 0; LIKELY(stress_continue_flag() && (i < yielders)); i++) {
pids[i] = fork();
if (pids[i] < 0) {
pr_dbg("%s: fork failed (instance %" PRIu32
Expand Down

0 comments on commit 335b2e9

Please sign in to comment.