Skip to content

Commit

Permalink
stress-epoll: add LIKELY/UNLIKELY hints
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 de79972 commit a3bf4ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stress-epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static int epoll_notification(
int fd;
struct epoll_event event;

if (!stress_continue(args))
if (UNLIKELY(!stress_continue(args)))
return -1;
/* Try to limit too many open fds */
if (*fd_count > epoll_sockets)
Expand Down Expand Up @@ -639,7 +639,7 @@ static int epoll_client(
}
(void)close(fd);
stress_bogo_inc(args);
if (!stress_continue(args))
if (UNLIKELY(!stress_continue(args)))
break;
(void)shim_sched_yield();
} while (stress_continue(args));
Expand Down Expand Up @@ -838,7 +838,7 @@ static void NORETURN epoll_server(
errno = 0;

ret = sigsetjmp(jmp_env, 1);
if (!stress_continue(args))
if (UNLIKELY(!stress_continue(args)))
break;
if (UNLIKELY(ret != 0))
wait_segv = true;
Expand Down

0 comments on commit a3bf4ac

Please sign in to comment.