From: Alan Cox Date: Fri, 26 Dec 2014 20:10:36 +0000 (+0000) Subject: syscall_proc: change _time to allow multiple kinds of time X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=cb28e7453b3a4a70c4d8246518fa6813249526a0;p=FUZIX.git syscall_proc: change _time to allow multiple kinds of time Add since boot monotomic time. Yes this is an ABI break.... --- diff --git a/Kernel/syscall_proc.c b/Kernel/syscall_proc.c index aaf0f1e8..e9d05cc7 100644 --- a/Kernel/syscall_proc.c +++ b/Kernel/syscall_proc.c @@ -127,23 +127,34 @@ int16_t _setgid(void) /******************************************* -time (tvec) Function 27 +time (int type, tvec) Function 27 +uint16_t type; time_t *tvec; ============================================ Read Clock Time/Date to User Buffer. ********************************************/ #define tvec (time_t *)udata.u_argn +#define type (uint16_t)udata.u_argn1 int16_t _time(void) { time_t t; - rdtime(&t); - uput(&t, tvec, sizeof(t)); - return (0); + switch (type) { + case 0: + rdtime(&t); + uput(&t, tvec, sizeof(t)); + return (0); + case 1: + uput(&t.low, &ticks, sizeof(ticks)); + uzero(&t.high, sizeof(t.high)); + return 0; + default: + return -EINVAL; + } } #undef tvec - +#undef type /*******************************************