Skip to content

Commit

Permalink
stress-cpu-sched: 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 12, 2025
1 parent 3805664 commit 143cf2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stress-cpu-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ static void MLOCKED_TEXT stress_cpu_sched_hrtimer_handler(int sig)
return;
}

if (stress_continue_flag()) {
if (LIKELY(stress_continue_flag())) {
const pid_t pid = getpid();
if (n_cpus > 0) {
const int cpu_idx = stress_cpu_sched_rand_cpu_idx();
Expand Down

0 comments on commit 143cf2f

Please sign in to comment.