aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 64d37a3c594..11fde0caee5 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -707,6 +707,20 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
707 return -ERESTART_RESTARTBLOCK; 707 return -ERESTART_RESTARTBLOCK;
708} 708}
709 709
710asmlinkage long
711sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp)
712{
713 struct timespec tu;
714
715 if (copy_from_user(&tu, rqtp, sizeof(tu)))
716 return -EFAULT;
717
718 if (!timespec_valid(&tu))
719 return -EINVAL;
720
721 return hrtimer_nanosleep(&tu, rmtp, HRTIMER_REL, CLOCK_MONOTONIC);
722}
723
710/* 724/*
711 * Functions related to boot-time initialization: 725 * Functions related to boot-time initialization:
712 */ 726 */