]> err.no Git - linux-2.6/blobdiff - kernel/hrtimer.c
[SCSI] fc transport: add permanent_port_name fc_host attribute
[linux-2.6] / kernel / hrtimer.c
index 64d37a3c594848699d515008cfcf1f50feb4726d..f073a2461faa0b2090c4094215aa9d7804882eae 100644 (file)
@@ -108,6 +108,7 @@ void ktime_get_ts(struct timespec *ts)
        set_normalized_timespec(ts, ts->tv_sec + tomono.tv_sec,
                                ts->tv_nsec + tomono.tv_nsec);
 }
+EXPORT_SYMBOL_GPL(ktime_get_ts);
 
 /*
  * Functions and macros which are different for UP/SMP systems are kept in a
@@ -707,6 +708,20 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
        return -ERESTART_RESTARTBLOCK;
 }
 
+asmlinkage long
+sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp)
+{
+       struct timespec tu;
+
+       if (copy_from_user(&tu, rqtp, sizeof(tu)))
+               return -EFAULT;
+
+       if (!timespec_valid(&tu))
+               return -EINVAL;
+
+       return hrtimer_nanosleep(&tu, rmtp, HRTIMER_REL, CLOCK_MONOTONIC);
+}
+
 /*
  * Functions related to boot-time initialization:
  */