Lines Matching refs:lhs
24 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
61 set_normalized_timespec(&ts_delta, lhs.tv_sec + rhs.tv_sec, in timespec_add()
62 lhs.tv_nsec + rhs.tv_nsec); in timespec_add()
69 static inline struct timespec timespec_sub(struct timespec lhs, in timespec_sub() argument
73 set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec, in timespec_sub()
74 lhs.tv_nsec - rhs.tv_nsec); in timespec_sub()