]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/compat.c
compat: generic compat_sys_sched_rr_get_interval() implementation
[karo-tx-linux.git] / kernel / compat.c
index c28a306ae05c069bbd11f107438459c106c5dc59..f6150e92dfc9366488ce45a2b91e98b9fbd7e150 100644 (file)
@@ -1215,6 +1215,23 @@ compat_sys_sysinfo(struct compat_sysinfo __user *info)
        return 0;
 }
 
+#ifdef __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL
+asmlinkage long compat_sys_sched_rr_get_interval(compat_pid_t pid,
+                                                struct compat_timespec __user *interval)
+{
+       struct timespec t;
+       int ret;
+       mm_segment_t old_fs = get_fs();
+
+       set_fs(KERNEL_DS);
+       ret = sys_sched_rr_get_interval(pid, (struct timespec __user *)&t);
+       set_fs(old_fs);
+       if (put_compat_timespec(&t, interval))
+               return -EFAULT;
+       return ret;
+}
+#endif /* __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL */
+
 /*
  * Allocate user-space memory for the duration of a single system call,
  * in order to marshall parameters inside a compat thunk.