Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

linux/time.h: Extract common header for vDSO

The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.

Split time.h into linux and common headers to make the latter suitable
for inclusion in the vDSO library.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200320145351.32292-11-vincenzo.frascino@arm.com

authored by

Vincenzo Frascino and committed by
Thomas Gleixner
639fff1c b874b835

+13 -4
+1 -4
include/linux/time.h
··· 111 111 */ 112 112 #define time_between32(t, l, h) ((u32)(h) - (u32)(l) >= (u32)(t) - (u32)(l)) 113 113 114 - struct timens_offset { 115 - s64 sec; 116 - u64 nsec; 117 - }; 114 + # include <vdso/time.h> 118 115 119 116 #endif
+12
include/vdso/time.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __VDSO_TIME_H 3 + #define __VDSO_TIME_H 4 + 5 + #include <uapi/linux/types.h> 6 + 7 + struct timens_offset { 8 + s64 sec; 9 + u64 nsec; 10 + }; 11 + 12 + #endif /* __VDSO_TIME_H */