X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Ftime.h;h=ce321ac5c8f8ceba2f0bdb7640dbc71a9eab6687;hb=268a3dcfea2077fca60d3715caa5c96f9b5e6ea7;hp=4f1c9db577079ed3cc688def99e476219b5aa9b0;hpb=7110879cf2afbfb7af79675f5ff109e63d631c25;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/time.h b/include/linux/time.h index 4f1c9db5770..ce321ac5c8f 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -40,6 +40,8 @@ extern struct timezone sys_tz; #define NSEC_PER_SEC 1000000000L #define FSEC_PER_SEC 1000000000000000L +#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1) + static inline int timespec_equal(const struct timespec *a, const struct timespec *b) { @@ -74,6 +76,8 @@ extern unsigned long mktime(const unsigned int year, const unsigned int mon, const unsigned int min, const unsigned int sec); extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); +extern struct timespec timespec_add_safe(const struct timespec lhs, + const struct timespec rhs); /* * sub = lhs - rhs, in normalized form