Implement timebase_info. We don't know exactly what it should do yet...
This commit is contained in:
parent
302af6f02e
commit
ae748e840c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_clock.c,v 1.2 2002/11/28 21:21:32 manu Exp $ */
|
||||
/* $NetBSD: mach_clock.c,v 1.3 2002/11/29 17:08:16 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_clock.c,v 1.2 2002/11/28 21:21:32 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_clock.c,v 1.3 2002/11/29 17:08:16 manu Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -102,6 +102,30 @@ mach_sys_clock_sleep_trap(p, v, retval)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int
|
||||
mach_sys_timebase_info(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct mach_sys_timebase_info_args /*
|
||||
syscallarg(mach_timebase_info_t) info;
|
||||
*/ *uap = v;
|
||||
int error;
|
||||
struct mach_timebase_info info;
|
||||
|
||||
/* XXX This is probably bus speed, fill it accurately */
|
||||
info.numer = 4000000000UL;
|
||||
info.denom = 75189611UL;
|
||||
|
||||
if ((error = copyout(&info, (void *)SCARG(uap, info),
|
||||
sizeof(info))) != 0)
|
||||
return error;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
mach_clock_get_time(p, msgh, maxlen, dst)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_misc.c,v 1.13 2002/11/28 21:21:32 manu Exp $ */
|
||||
/* $NetBSD: mach_misc.c,v 1.14 2002/11/29 17:08:16 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -43,7 +43,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_misc.c,v 1.13 2002/11/28 21:21:32 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mach_misc.c,v 1.14 2002/11/29 17:08:16 manu Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -272,18 +272,6 @@ mach_sys_syscall_thread_switch(struct proc *p, void *v, register_t *r) {
|
|||
}
|
||||
|
||||
|
||||
int
|
||||
mach_sys_timebase_info(struct proc *p, void *v, register_t *r) {
|
||||
#ifdef DEBUG_MACH
|
||||
struct mach_sys_timebase_info_args *ap = v;
|
||||
#endif
|
||||
*r = 0;
|
||||
DPRINTF(("mach_sys_timebase_info(%p);\n",
|
||||
&SCARG(ap, info)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
mach_sys_wait_until(struct proc *p, void *v, register_t *r) {
|
||||
#ifdef DEBUG_MACH
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach_types.h,v 1.6 2002/11/26 08:10:19 manu Exp $ */
|
||||
/* $NetBSD: mach_types.h,v 1.7 2002/11/29 17:08:16 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -59,10 +59,10 @@ typedef unsigned int mach_vm_size_t;
|
|||
typedef unsigned long mach_vm_offset_t;
|
||||
typedef void *mach_cproc_t; /* Unkown, see xnu/osfmk/ppc/hw_exception.s */
|
||||
|
||||
typedef struct {
|
||||
typedef struct mach_timebase_info {
|
||||
u_int32_t numer;
|
||||
u_int32_t denom;
|
||||
} mach_timebase_info_t;
|
||||
} *mach_timebase_info_t;
|
||||
|
||||
typedef struct {
|
||||
u_int8_t mig_vers;
|
||||
|
|
Loading…
Reference in New Issue