summaryrefslogtreecommitdiffstats
path: root/include/linux/compat.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-13 00:13:48 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-13 00:13:48 -0500
commit3875e1945b55f0eb83fe7359614a801eeb716761 (patch)
tree4567aef3fb7d081cb7d7b7c9bcd94e0e44d39557 /include/linux/compat.h
parent587005de144acd3007b8e7f2a2a7c6add157c155 (diff)
parentf1b318793dcd2d9ff6b5ac06e7762098fa079cee (diff)
downloadop-kernel-dev-3875e1945b55f0eb83fe7359614a801eeb716761.zip
op-kernel-dev-3875e1945b55f0eb83fe7359614a801eeb716761.tar.gz
Merge branch 'upstream'
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r--include/linux/compat.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index f9ca534..c9ab2a2 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -161,5 +161,25 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from);
int get_compat_sigevent(struct sigevent *event,
const struct compat_sigevent __user *u_event);
+static inline int compat_timeval_compare(struct compat_timeval *lhs,
+ struct compat_timeval *rhs)
+{
+ if (lhs->tv_sec < rhs->tv_sec)
+ return -1;
+ if (lhs->tv_sec > rhs->tv_sec)
+ return 1;
+ return lhs->tv_usec - rhs->tv_usec;
+}
+
+static inline int compat_timespec_compare(struct compat_timespec *lhs,
+ struct compat_timespec *rhs)
+{
+ if (lhs->tv_sec < rhs->tv_sec)
+ return -1;
+ if (lhs->tv_sec > rhs->tv_sec)
+ return 1;
+ return lhs->tv_nsec - rhs->tv_nsec;
+}
+
#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */
OpenPOWER on IntegriCloud