diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kernel.h | 4 | ||||
-rw-r--r-- | include/linux/log2.h | 2 | ||||
-rw-r--r-- | include/linux/sched.h | 1 | ||||
-rw-r--r-- | include/linux/time64.h | 6 |
4 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index a4c8149e..a281edcf 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -101,6 +101,10 @@ #define swap(a, b) \ do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) +/* This counts to 12. Any more, it will return 13th argument. */ +#define __COUNT_ARGS(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _n, X...) _n +#define COUNT_ARGS(X...) __COUNT_ARGS(, ##X, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) + #define _RET_IP_ (unsigned long)__builtin_return_address(0) #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) diff --git a/include/linux/log2.h b/include/linux/log2.h index 96f62458..2bbe25e4 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h @@ -23,7 +23,7 @@ /* * deal with unrepresentable constant logarithms */ -extern __attribute__((const, noreturn)) +extern __attribute__((const)) int ____ilog2_NaN(void); /* diff --git a/include/linux/sched.h b/include/linux/sched.h index 38a5fecb..f9bb6a4d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -146,6 +146,7 @@ static inline struct timespec current_kernel_time(void) return ts; } +#define current_kernel_time64() current_kernel_time() #define CURRENT_TIME (current_kernel_time()) #endif /* __TOOLS_LINUX_SCHED_H */ diff --git a/include/linux/time64.h b/include/linux/time64.h index fd59a9a6..cd6cc1c1 100644 --- a/include/linux/time64.h +++ b/include/linux/time64.h @@ -3,6 +3,8 @@ #include <linux/types.h> +#define timespec64 timespec + typedef __s64 time64_t; /* Parameters used to convert the timespec values: */ @@ -42,4 +44,8 @@ static inline struct timespec timespec_trunc(struct timespec t, unsigned gran) return t; } +#define ns_to_timespec64 ns_to_timespec +#define timespec64_to_ns timespec_to_ns +#define timespec64_trunc timespec_trunc + #endif /* _LINUX_TIME64_H */ |