]> Git Repo - linux.git/commitdiff
y2038: Provide aliases for compat helpers
authorArnd Bergmann <[email protected]>
Tue, 21 Aug 2018 20:33:00 +0000 (22:33 +0200)
committerThomas Gleixner <[email protected]>
Wed, 22 Aug 2018 13:11:35 +0000 (15:11 +0200)
As part of the system call rework for 64-bit time_t, we are restructuring
the way that compat syscalls deal with 32-bit time_t, reusing the
implementation for 32-bit architectures. Christoph Hellwig suggested a
rename of the associated types and interfaces to avoid the confusing usage
of the 'compat' prefix for 32-bit architectures.

To prepare for doing that in linux-4.20, add a set of macros that allows to
convert subsystems separately to the new names and avoids some of the
nastier merge conflicts.

Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Cc: [email protected]
Cc: John Stultz <[email protected]>
Cc: Deepa Dinamani <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
include/linux/time32.h

index 0b14f936100a24ead41455de43dda08c8448cca2..d1ae43c13e25940e2febed51919c171e3018ed3f 100644 (file)
@@ -207,4 +207,19 @@ static inline s64 timeval_to_ns(const struct timeval *tv)
 extern struct timeval ns_to_timeval(const s64 nsec);
 extern struct __kernel_old_timeval ns_to_kernel_old_timeval(s64 nsec);
 
+/*
+ * New aliases for compat time functions. These will be used to replace
+ * the compat code so it can be shared between 32-bit and 64-bit builds
+ * both of which provide compatibility with old 32-bit tasks.
+ */
+#define old_time32_t           compat_time_t
+#define old_timeval32          compat_timeval
+#define old_timespec32         compat_timespec
+#define old_itimerspec32       compat_itimerspec
+#define ns_to_old_timeval32    ns_to_compat_timeval
+#define get_old_itimerspec32   get_compat_itimerspec64
+#define put_old_itimerspec32   put_compat_itimerspec64
+#define get_old_timespec32     compat_get_timespec64
+#define put_old_timespec32     compat_put_timespec64
+
 #endif
This page took 0.05635 seconds and 4 git commands to generate.