Re: [PATCH] CPU time clock support in clock_* syscalls

From: Andrew Morton
Date: Tue Oct 05 2004 - 00:24:33 EST


Roland McGrath <roland@xxxxxxxxxx> wrote:
>
> +int posix_cpu_clock_settime(clockid_t which_clock,
> + const struct timespec __user *tp)
> +{
> + /*
> + * You can never reset a CPU clock, but we check for other errors
> + * in the call before failing with EPERM.
> + */
> + int error = check_clock(which_clock);
> + if (error == 0) {
> + struct timespec new_tp;
> + error = -EPERM;
> + if (copy_from_user(&new_tp, tp, sizeof *tp))
> + error = -EFAULT;
> + }
> + return error;
> +}

This will always return an error.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/