aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/clock.h
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2008-04-22 19:38:30 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2008-04-22 19:38:30 +0000
commit9b4a8ab7bad97bcb374ab6498fe8a3ff50f260d4 (patch)
treee4f15176f61a95b3d24f7c514cf7cb4c76fbb8bf /sys/sys/clock.h
parentdbef86ad30078ac5c8df60cfc989b1ec2ce4ace9 (diff)
downloadsrc-9b4a8ab7bad97bcb374ab6498fe8a3ff50f260d4.tar.gz
src-9b4a8ab7bad97bcb374ab6498fe8a3ff50f260d4.zip
Now that all platforms use genclock, shuffle things around slightly
for better structure. Much of this is related to <sys/clock.h>, which should really have been called <sys/calendar.h>, but unless and until we need the name, the repocopy can wait. In general the kernel does not know about minutes, hours, days, timezones, daylight savings time, leap-years and such. All that is theoretically a matter for userland only. Parts of kernel code does however care: badly designed filesystems store timestamps in local time and RTC chips almost universally track time in a YY-MM-DD HH:MM:SS format, and sometimes in local timezone instead of UTC. For this we have <sys/clock.h> <sys/time.h> on the other hand, deals with time_t, timeval, timespec and so on. These know only seconds and fractions thereof. Move inittodr() and resettodr() prototypes to <sys/time.h>. Retain the names as it is one of the few surviving PDP/VAX references. Move startrtclock() to <machine/clock.h> on relevant platforms, it is a MD call between machdep.c/clock.c. Remove references to it elsewhere. Remove a lot of unnecessary <sys/clock.h> includes. Move the machdep.disable_rtc_set sysctl to subr_rtc.c where it belongs. XXX: should be kern.disable_rtc_set really, it's not MD.
Notes
Notes: svn path=/head/; revision=178429
Diffstat (limited to 'sys/sys/clock.h')
-rw-r--r--sys/sys/clock.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/sys/clock.h b/sys/sys/clock.h
index 00f682148238..c08683eb1b4c 100644
--- a/sys/sys/clock.h
+++ b/sys/sys/clock.h
@@ -35,6 +35,19 @@
*
* $NetBSD: clock_subr.h,v 1.7 2000/10/03 13:41:07 tsutsui Exp $
*
+ *
+ * This file is the central clearing-house for calendrical issues.
+ *
+ * In general the kernel does not know about minutes, hours, days, timezones,
+ * daylight savings time, leap-years and such. All that is theoretically a
+ * matter for userland only.
+ *
+ * Parts of kernel code does however care: badly designed filesystems store
+ * timestamps in local time and RTC chips sometimes track time in a local
+ * timezone instead of UTC and so on.
+ *
+ * All that code should go here for service.
+ *
* $FreeBSD$
*/
@@ -44,15 +57,6 @@
#ifdef _KERNEL /* No user serviceable parts */
/*
- * Kernel to clock driver interface.
- */
-void inittodr(time_t base);
-void resettodr(void);
-void startrtclock(void);
-
-extern int disable_rtc_set;
-
-/*
* Timezone info from settimeofday(2), usually not used
*/
extern int tz_minuteswest;