diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/time.h | 18 | ||||
| -rw-r--r-- | include/linux/time64.h | 28 |
2 files changed, 0 insertions, 46 deletions
diff --git a/include/linux/time.h b/include/linux/time.h index c0fbad08448f..0e8a80918484 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
| @@ -39,15 +39,6 @@ static inline int timespec_compare(const struct timespec *lhs, const struct time | |||
| 39 | return lhs->tv_nsec - rhs->tv_nsec; | 39 | return lhs->tv_nsec - rhs->tv_nsec; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs) | ||
| 43 | { | ||
| 44 | if (lhs->tv_sec < rhs->tv_sec) | ||
| 45 | return -1; | ||
| 46 | if (lhs->tv_sec > rhs->tv_sec) | ||
| 47 | return 1; | ||
| 48 | return lhs->tv_usec - rhs->tv_usec; | ||
| 49 | } | ||
| 50 | |||
| 51 | extern time64_t mktime64(const unsigned int year, const unsigned int mon, | 42 | extern time64_t mktime64(const unsigned int year, const unsigned int mon, |
| 52 | const unsigned int day, const unsigned int hour, | 43 | const unsigned int day, const unsigned int hour, |
| 53 | const unsigned int min, const unsigned int sec); | 44 | const unsigned int min, const unsigned int sec); |
| @@ -65,15 +56,6 @@ static inline unsigned long mktime(const unsigned int year, | |||
| 65 | 56 | ||
| 66 | extern void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec); | 57 | extern void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec); |
| 67 | 58 | ||
| 68 | /* | ||
| 69 | * timespec_add_safe assumes both values are positive and checks | ||
| 70 | * for overflow. It will return TIME_T_MAX if the reutrn would be | ||
| 71 | * smaller then either of the arguments. | ||
| 72 | */ | ||
| 73 | extern struct timespec timespec_add_safe(const struct timespec lhs, | ||
| 74 | const struct timespec rhs); | ||
| 75 | |||
| 76 | |||
| 77 | static inline struct timespec timespec_add(struct timespec lhs, | 59 | static inline struct timespec timespec_add(struct timespec lhs, |
| 78 | struct timespec rhs) | 60 | struct timespec rhs) |
| 79 | { | 61 | { |
diff --git a/include/linux/time64.h b/include/linux/time64.h index 980c71b3001a..402b595c76d2 100644 --- a/include/linux/time64.h +++ b/include/linux/time64.h | |||
| @@ -53,16 +53,6 @@ static inline struct timespec64 timespec_to_timespec64(const struct timespec ts) | |||
| 53 | return ts; | 53 | return ts; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | static inline struct itimerspec itimerspec64_to_itimerspec(struct itimerspec64 *its64) | ||
| 57 | { | ||
| 58 | return *its64; | ||
| 59 | } | ||
| 60 | |||
| 61 | static inline struct itimerspec64 itimerspec_to_itimerspec64(struct itimerspec *its) | ||
| 62 | { | ||
| 63 | return *its; | ||
| 64 | } | ||
| 65 | |||
| 66 | # define timespec64_equal timespec_equal | 56 | # define timespec64_equal timespec_equal |
| 67 | # define timespec64_compare timespec_compare | 57 | # define timespec64_compare timespec_compare |
| 68 | # define set_normalized_timespec64 set_normalized_timespec | 58 | # define set_normalized_timespec64 set_normalized_timespec |
| @@ -94,24 +84,6 @@ static inline struct timespec64 timespec_to_timespec64(const struct timespec ts) | |||
| 94 | return ret; | 84 | return ret; |
| 95 | } | 85 | } |
| 96 | 86 | ||
| 97 | static inline struct itimerspec itimerspec64_to_itimerspec(struct itimerspec64 *its64) | ||
| 98 | { | ||
| 99 | struct itimerspec ret; | ||
| 100 | |||
| 101 | ret.it_interval = timespec64_to_timespec(its64->it_interval); | ||
| 102 | ret.it_value = timespec64_to_timespec(its64->it_value); | ||
| 103 | return ret; | ||
| 104 | } | ||
| 105 | |||
| 106 | static inline struct itimerspec64 itimerspec_to_itimerspec64(struct itimerspec *its) | ||
| 107 | { | ||
| 108 | struct itimerspec64 ret; | ||
| 109 | |||
| 110 | ret.it_interval = timespec_to_timespec64(its->it_interval); | ||
| 111 | ret.it_value = timespec_to_timespec64(its->it_value); | ||
| 112 | return ret; | ||
| 113 | } | ||
| 114 | |||
| 115 | static inline int timespec64_equal(const struct timespec64 *a, | 87 | static inline int timespec64_equal(const struct timespec64 *a, |
| 116 | const struct timespec64 *b) | 88 | const struct timespec64 *b) |
| 117 | { | 89 | { |
