From 5711a053c77290f6557d6c771a63b02411b5dc97 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 23 May 2015 13:53:57 +0100 Subject: [PATCH] syscall_proc: fix the CLOCK_MONOTONIC timer --- Kernel/syscall_proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Kernel/syscall_proc.c b/Kernel/syscall_proc.c index dfce06f7..8b8a64a7 100644 --- a/Kernel/syscall_proc.c +++ b/Kernel/syscall_proc.c @@ -141,16 +141,16 @@ arg_t _time(void) switch (type) { case 0: rdtime(&t); - uput(&t, tvec, sizeof(t)); - return (0); + break; case 1: - uput(&t.low, &ticks.full, sizeof(ticks)); - uzero(&t.high, sizeof(t.high)); - return 0; + t.low = ticks.full; + t.high = 0; + break; default: udata.u_error = EINVAL; return -1; } + return uput(&t, tvec, sizeof(t)); } #undef tvec -- 2.34.1