Commit 474b9c77 authored by Arnd Bergmann's avatar Arnd Bergmann

y2038: sched: Change sched_rr_get_interval to use __kernel_timespec

This is a preparation patch for converting sys_sched_rr_get_interval to
work with 64-bit time_t on 32-bit architectures. The 'interval' argument
is changed to struct __kernel_timespec, which will be redefined using
64-bit time_t in the future. The compat version of the system call in
turn is enabled for compilation with CONFIG_COMPAT_32BIT_TIME so
the individual 32-bit architectures can share the handling of the
traditional argument with 64-bit architectures providing it for their
compat mode.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 4faea239
...@@ -614,7 +614,7 @@ asmlinkage long sys_sched_yield(void); ...@@ -614,7 +614,7 @@ asmlinkage long sys_sched_yield(void);
asmlinkage long sys_sched_get_priority_max(int policy); asmlinkage long sys_sched_get_priority_max(int policy);
asmlinkage long sys_sched_get_priority_min(int policy); asmlinkage long sys_sched_get_priority_min(int policy);
asmlinkage long sys_sched_rr_get_interval(pid_t pid, asmlinkage long sys_sched_rr_get_interval(pid_t pid,
struct timespec __user *interval); struct __kernel_timespec __user *interval);
/* kernel/signal.c */ /* kernel/signal.c */
asmlinkage long sys_restart_syscall(void); asmlinkage long sys_restart_syscall(void);
......
...@@ -5243,7 +5243,7 @@ static int sched_rr_get_interval(pid_t pid, struct timespec64 *t) ...@@ -5243,7 +5243,7 @@ static int sched_rr_get_interval(pid_t pid, struct timespec64 *t)
* an error code. * an error code.
*/ */
SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid, SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid,
struct timespec __user *, interval) struct __kernel_timespec __user *, interval)
{ {
struct timespec64 t; struct timespec64 t;
int retval = sched_rr_get_interval(pid, &t); int retval = sched_rr_get_interval(pid, &t);
...@@ -5254,7 +5254,7 @@ SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid, ...@@ -5254,7 +5254,7 @@ SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid,
return retval; return retval;
} }
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT_32BIT_TIME
COMPAT_SYSCALL_DEFINE2(sched_rr_get_interval, COMPAT_SYSCALL_DEFINE2(sched_rr_get_interval,
compat_pid_t, pid, compat_pid_t, pid,
struct old_timespec32 __user *, interval) struct old_timespec32 __user *, interval)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment