Home
last modified time | relevance | path

Searched refs:lhs (Results 1 – 4 of 4) sorted by relevance

/include/linux/
Dtime.h24 static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) in timespec_compare() argument
26 if (lhs->tv_sec < rhs->tv_sec) in timespec_compare()
28 if (lhs->tv_sec > rhs->tv_sec) in timespec_compare()
30 return lhs->tv_nsec - rhs->tv_nsec; in timespec_compare()
33 static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs) in timeval_compare() argument
35 if (lhs->tv_sec < rhs->tv_sec) in timeval_compare()
37 if (lhs->tv_sec > rhs->tv_sec) in timeval_compare()
39 return lhs->tv_usec - rhs->tv_usec; in timeval_compare()
53 extern struct timespec timespec_add_safe(const struct timespec lhs,
57 static inline struct timespec timespec_add(struct timespec lhs, in timespec_add() argument
[all …]
Dtime64.h89 static inline int timespec64_compare(const struct timespec64 *lhs, const struct timespec64 *rhs) in timespec64_compare() argument
91 if (lhs->tv_sec < rhs->tv_sec) in timespec64_compare()
93 if (lhs->tv_sec > rhs->tv_sec) in timespec64_compare()
95 return lhs->tv_nsec - rhs->tv_nsec; in timespec64_compare()
105 extern struct timespec64 timespec64_add_safe(const struct timespec64 lhs,
109 static inline struct timespec64 timespec64_add(struct timespec64 lhs, in timespec64_add() argument
113 set_normalized_timespec64(&ts_delta, lhs.tv_sec + rhs.tv_sec, in timespec64_add()
114 lhs.tv_nsec + rhs.tv_nsec); in timespec64_add()
121 static inline struct timespec64 timespec64_sub(struct timespec64 lhs, in timespec64_sub() argument
125 set_normalized_timespec64(&ts_delta, lhs.tv_sec - rhs.tv_sec, in timespec64_sub()
[all …]
Dktime.h59 #define ktime_sub(lhs, rhs) \ argument
60 ({ (ktime_t){ .tv64 = (lhs).tv64 - (rhs).tv64 }; })
63 #define ktime_add(lhs, rhs) \ argument
64 ({ (ktime_t){ .tv64 = (lhs).tv64 + (rhs).tv64 }; })
229 extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs);
Dcompat.h392 static inline int compat_timeval_compare(struct compat_timeval *lhs, in compat_timeval_compare() argument
395 if (lhs->tv_sec < rhs->tv_sec) in compat_timeval_compare()
397 if (lhs->tv_sec > rhs->tv_sec) in compat_timeval_compare()
399 return lhs->tv_usec - rhs->tv_usec; in compat_timeval_compare()
402 static inline int compat_timespec_compare(struct compat_timespec *lhs, in compat_timespec_compare() argument
405 if (lhs->tv_sec < rhs->tv_sec) in compat_timespec_compare()
407 if (lhs->tv_sec > rhs->tv_sec) in compat_timespec_compare()
409 return lhs->tv_nsec - rhs->tv_nsec; in compat_timespec_compare()