Skip to content

Commit 3c80b40

Browse files
committed
rcutorture: Convert ULONG_CMP_LT() to time_before()
This commit converts three ULONG_CMP_LT() invocations in rcutorture to time_before() to reflect the fact that they are comparing timestamps to the jiffies counter. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 04dbcdb commit 3c80b40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/rcu/rcutorture.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ static int rcu_torture_boost(void *arg)
848848

849849
/* Wait for the next test interval. */
850850
oldstarttime = boost_starttime;
851-
while (ULONG_CMP_LT(jiffies, oldstarttime)) {
851+
while (time_before(jiffies, oldstarttime)) {
852852
schedule_timeout_interruptible(oldstarttime - jiffies);
853853
stutter_wait("rcu_torture_boost");
854854
if (torture_must_stop())
@@ -858,7 +858,7 @@ static int rcu_torture_boost(void *arg)
858858
/* Do one boost-test interval. */
859859
endtime = oldstarttime + test_boost_duration * HZ;
860860
call_rcu_time = jiffies;
861-
while (ULONG_CMP_LT(jiffies, endtime)) {
861+
while (time_before(jiffies, endtime)) {
862862
/* If we don't have a callback in flight, post one. */
863863
if (!smp_load_acquire(&rbi.inflight)) {
864864
/* RCU core before ->inflight = 1. */
@@ -929,7 +929,7 @@ rcu_torture_fqs(void *arg)
929929
VERBOSE_TOROUT_STRING("rcu_torture_fqs task started");
930930
do {
931931
fqs_resume_time = jiffies + fqs_stutter * HZ;
932-
while (ULONG_CMP_LT(jiffies, fqs_resume_time) &&
932+
while (time_before(jiffies, fqs_resume_time) &&
933933
!kthread_should_stop()) {
934934
schedule_timeout_interruptible(1);
935935
}

0 commit comments

Comments
 (0)