| .. | .. |
|---|
| 3 | 3 | #define _LINUX_JIFFIES_H |
|---|
| 4 | 4 | |
|---|
| 5 | 5 | #include <linux/cache.h> |
|---|
| 6 | +#include <linux/limits.h> |
|---|
| 6 | 7 | #include <linux/math64.h> |
|---|
| 7 | | -#include <linux/kernel.h> |
|---|
| 8 | +#include <linux/minmax.h> |
|---|
| 8 | 9 | #include <linux/types.h> |
|---|
| 9 | 10 | #include <linux/time.h> |
|---|
| 10 | 11 | #include <linux/timex.h> |
|---|
| .. | .. |
|---|
| 295 | 296 | } |
|---|
| 296 | 297 | |
|---|
| 297 | 298 | extern u64 jiffies64_to_nsecs(u64 j); |
|---|
| 299 | +extern u64 jiffies64_to_msecs(u64 j); |
|---|
| 298 | 300 | |
|---|
| 299 | 301 | extern unsigned long __msecs_to_jiffies(const unsigned int m); |
|---|
| 300 | 302 | #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ) |
|---|
| .. | .. |
|---|
| 419 | 421 | extern unsigned long timespec64_to_jiffies(const struct timespec64 *value); |
|---|
| 420 | 422 | extern void jiffies_to_timespec64(const unsigned long jiffies, |
|---|
| 421 | 423 | 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 | | - |
|---|
| 442 | 424 | extern clock_t jiffies_to_clock_t(unsigned long x); |
|---|
| 443 | 425 | static inline clock_t jiffies_delta_to_clock_t(long delta) |
|---|
| 444 | 426 | { |
|---|