we now export information about CLK_TCK via ELF aux args, no need to
hardcode '100' for times(2) anymore; use 'hz' instead
This commit is contained in:
parent
cee43b67cc
commit
6788e239e4
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: linux_misc.c,v 1.112 2002/11/13 08:27:10 jdolecek Exp $ */
|
/* $NetBSD: linux_misc.c,v 1.113 2002/11/13 15:20:04 jdolecek Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
|
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
|
||||||
@ -64,7 +64,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.112 2002/11/13 08:27:10 jdolecek Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.113 2002/11/13 15:20:04 jdolecek Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -584,11 +584,9 @@ linux_sys_mprotect(p, v, retval)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This code is partly stolen from src/lib/libc/compat-43/times.c
|
* This code is partly stolen from src/lib/libc/compat-43/times.c
|
||||||
* XXX - CLK_TCK isn't declared in /sys, just in <time.h>, done here
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CLK_TCK 100
|
#define CONVTCK(r) (r.tv_sec * hz + r.tv_usec / (1000000 / hz))
|
||||||
#define CONVTCK(r) (r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK))
|
|
||||||
|
|
||||||
int
|
int
|
||||||
linux_sys_times(p, v, retval)
|
linux_sys_times(p, v, retval)
|
||||||
@ -625,6 +623,8 @@ linux_sys_times(p, v, retval)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef CONVTCK
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Linux 'readdir' call. This code is mostly taken from the
|
* Linux 'readdir' call. This code is mostly taken from the
|
||||||
* SunOS getdents call (see compat/sunos/sunos_misc.c), though
|
* SunOS getdents call (see compat/sunos/sunos_misc.c), though
|
||||||
|
Loading…
Reference in New Issue
Block a user