diff options
| author | Steve French <sfrench@us.ibm.com> | 2006-02-14 22:36:31 -0500 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2006-02-14 22:36:31 -0500 |
| commit | 0ed3f64ec3a7ad29e83e03607115eeffa32f553c (patch) | |
| tree | 528681b043e947cfc51527d56098f586b6dfa217 /include/linux/compat.h | |
| parent | 5815449d1bfcb22f74b0e36a8b0631d6584cb7fc (diff) | |
| parent | 10ee39fe3ff618d274e1cd0f6abbc2917b736bfd (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'include/linux/compat.h')
| -rw-r--r-- | include/linux/compat.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index f9ca534787e2..c9ab2a26348c 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); | |||
| 161 | int get_compat_sigevent(struct sigevent *event, | 161 | int get_compat_sigevent(struct sigevent *event, |
| 162 | const struct compat_sigevent __user *u_event); | 162 | const struct compat_sigevent __user *u_event); |
| 163 | 163 | ||
| 164 | static inline int compat_timeval_compare(struct compat_timeval *lhs, | ||
| 165 | struct compat_timeval *rhs) | ||
| 166 | { | ||
| 167 | if (lhs->tv_sec < rhs->tv_sec) | ||
| 168 | return -1; | ||
| 169 | if (lhs->tv_sec > rhs->tv_sec) | ||
| 170 | return 1; | ||
| 171 | return lhs->tv_usec - rhs->tv_usec; | ||
| 172 | } | ||
| 173 | |||
| 174 | static inline int compat_timespec_compare(struct compat_timespec *lhs, | ||
| 175 | struct compat_timespec *rhs) | ||
| 176 | { | ||
| 177 | if (lhs->tv_sec < rhs->tv_sec) | ||
| 178 | return -1; | ||
| 179 | if (lhs->tv_sec > rhs->tv_sec) | ||
| 180 | return 1; | ||
| 181 | return lhs->tv_nsec - rhs->tv_nsec; | ||
| 182 | } | ||
| 183 | |||
| 164 | #endif /* CONFIG_COMPAT */ | 184 | #endif /* CONFIG_COMPAT */ |
| 165 | #endif /* _LINUX_COMPAT_H */ | 185 | #endif /* _LINUX_COMPAT_H */ |
