Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Move clock_gettime1() to subr_time.c (which is incl...
details: https://anonhg.NetBSD.org/src/rev/a651088f2d0e
branches: trunk
changeset: 785758:a651088f2d0e
user: martin <martin%NetBSD.org@localhost>
date: Fri Mar 29 10:34:12 2013 +0000
description:
Move clock_gettime1() to subr_time.c (which is included in rump kernels)
diffstat:
sys/kern/kern_time.c | 22 ++--------------------
sys/kern/subr_time.c | 22 ++++++++++++++++++++--
2 files changed, 22 insertions(+), 22 deletions(-)
diffs (86 lines):
diff -r 84cb57f6486d -r a651088f2d0e sys/kern/kern_time.c
--- a/sys/kern/kern_time.c Fri Mar 29 02:32:38 2013 +0000
+++ b/sys/kern/kern_time.c Fri Mar 29 10:34:12 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_time.c,v 1.176 2013/03/29 01:08:17 christos Exp $ */
+/* $NetBSD: kern_time.c,v 1.177 2013/03/29 10:34:12 martin Exp $ */
/*-
* Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.176 2013/03/29 01:08:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.177 2013/03/29 10:34:12 martin Exp $");
#include <sys/param.h>
#include <sys/resourcevar.h>
@@ -190,24 +190,6 @@
return copyout(&ats, SCARG(uap, tp), sizeof(ats));
}
-int
-clock_gettime1(clockid_t clock_id, struct timespec *ts)
-{
-
- switch (clock_id) {
- case CLOCK_REALTIME:
- nanotime(ts);
- break;
- case CLOCK_MONOTONIC:
- nanouptime(ts);
- break;
- default:
- return EINVAL;
- }
-
- return 0;
-}
-
/* ARGSUSED */
int
sys___clock_settime50(struct lwp *l,
diff -r 84cb57f6486d -r a651088f2d0e sys/kern/subr_time.c
--- a/sys/kern/subr_time.c Fri Mar 29 02:32:38 2013 +0000
+++ b/sys/kern/subr_time.c Fri Mar 29 10:34:12 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_time.c,v 1.10 2013/03/29 01:08:17 christos Exp $ */
+/* $NetBSD: subr_time.c,v 1.11 2013/03/29 10:34:12 martin Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_time.c,v 1.10 2013/03/29 01:08:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_time.c,v 1.11 2013/03/29 10:34:12 martin Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -212,6 +212,24 @@
return tstohz(ts);
}
+int
+clock_gettime1(clockid_t clock_id, struct timespec *ts)
+{
+
+ switch (clock_id) {
+ case CLOCK_REALTIME:
+ nanotime(ts);
+ break;
+ case CLOCK_MONOTONIC:
+ nanouptime(ts);
+ break;
+ default:
+ return EINVAL;
+ }
+
+ return 0;
+}
+
/*
* Calculate delta and convert from struct timespec to the ticks.
*/
Home |
Main Index |
Thread Index |
Old Index