From 3207e8b6a4339f39e2261d1f1878e8049b65c23c Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 20 May 2014 05:06:31 +0200 Subject: add _nsec() syscall 53 for binary compatibility with labs distribution the new syscall is added under the symbol _nsec() for binary compatibility. nsec() is still a library function reading /dev/bintime. --- sys/src/9/port/sysproc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sys/src/9/port/sysproc.c') diff --git a/sys/src/9/port/sysproc.c b/sys/src/9/port/sysproc.c index 5a602112a..fbe4f2fbc 100644 --- a/sys/src/9/port/sysproc.c +++ b/sys/src/9/port/sysproc.c @@ -1182,3 +1182,16 @@ syssemrelease(va_list list) error(Ebadarg); return (uintptr)semrelease(s, addr, delta); } + +/* For binary compatibility */ +uintptr +sys_nsec(va_list list) +{ + vlong *v; + + v = va_arg(list, vlong*); + evenaddr((uintptr)v); + validaddr((uintptr)v, sizeof(vlong), 1); + *v = todget(nil); + return 0; +} -- cgit v1.2.3