hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/include/linux/jiffies.h
....@@ -3,8 +3,9 @@
33 #define _LINUX_JIFFIES_H
44
55 #include <linux/cache.h>
6
+#include <linux/limits.h>
67 #include <linux/math64.h>
7
-#include <linux/kernel.h>
8
+#include <linux/minmax.h>
89 #include <linux/types.h>
910 #include <linux/time.h>
1011 #include <linux/timex.h>
....@@ -295,6 +296,7 @@
295296 }
296297
297298 extern u64 jiffies64_to_nsecs(u64 j);
299
+extern u64 jiffies64_to_msecs(u64 j);
298300
299301 extern unsigned long __msecs_to_jiffies(const unsigned int m);
300302 #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
....@@ -419,26 +421,6 @@
419421 extern unsigned long timespec64_to_jiffies(const struct timespec64 *value);
420422 extern void jiffies_to_timespec64(const unsigned long jiffies,
421423 struct timespec64 *value);
422
-static inline unsigned long timespec_to_jiffies(const struct timespec *value)
423
-{
424
- struct timespec64 ts = timespec_to_timespec64(*value);
425
-
426
- return timespec64_to_jiffies(&ts);
427
-}
428
-
429
-static inline void jiffies_to_timespec(const unsigned long jiffies,
430
- struct timespec *value)
431
-{
432
- struct timespec64 ts;
433
-
434
- jiffies_to_timespec64(jiffies, &ts);
435
- *value = timespec64_to_timespec(ts);
436
-}
437
-
438
-extern unsigned long timeval_to_jiffies(const struct timeval *value);
439
-extern void jiffies_to_timeval(const unsigned long jiffies,
440
- struct timeval *value);
441
-
442424 extern clock_t jiffies_to_clock_t(unsigned long x);
443425 static inline clock_t jiffies_delta_to_clock_t(long delta)
444426 {