summaryrefslogtreecommitdiff
path: root/include/linux/torture.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2023-07-26 23:57:03 +0300
committerFrederic Weisbecker <frederic@kernel.org>2023-09-24 18:24:01 +0300
commita741deac787f0d2d7068638c067db20af9e63752 (patch)
treedcf2586b545487b69044369c79eaa903c3989041 /include/linux/torture.h
parent40baf39fc57c61554dc744d924257940574ac76b (diff)
downloadlinux-a741deac787f0d2d7068638c067db20af9e63752.tar.xz
torture: Make torture_hrtimeout_ns() take an hrtimer mode parameter
The current torture-test sleeps are waiting for a duration, but there are situations where it is better to wait for an absolute time, for example, when ending a stutter interval. This commit therefore adds an hrtimer mode parameter to torture_hrtimeout_ns(). Why not also the other torture_hrtimeout_*() functions? The theory is that most absolute times will be in nanoseconds, especially not (say) jiffies. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Diffstat (limited to 'include/linux/torture.h')
-rw-r--r--include/linux/torture.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/torture.h b/include/linux/torture.h
index bb466eec01e4..017f0f710815 100644
--- a/include/linux/torture.h
+++ b/include/linux/torture.h
@@ -81,7 +81,8 @@ static inline void torture_random_init(struct torture_random_state *trsp)
}
/* Definitions for high-resolution-timer sleeps. */
-int torture_hrtimeout_ns(ktime_t baset_ns, u32 fuzzt_ns, struct torture_random_state *trsp);
+int torture_hrtimeout_ns(ktime_t baset_ns, u32 fuzzt_ns, const enum hrtimer_mode mode,
+ struct torture_random_state *trsp);
int torture_hrtimeout_us(u32 baset_us, u32 fuzzt_ns, struct torture_random_state *trsp);
int torture_hrtimeout_ms(u32 baset_ms, u32 fuzzt_us, struct torture_random_state *trsp);
int torture_hrtimeout_jiffies(u32 baset_j, struct torture_random_state *trsp);