diff options
author | phk <phk@FreeBSD.org> | 2008-04-22 19:38:30 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2008-04-22 19:38:30 +0000 |
commit | 8d647da1edcc4aad93660da8a41dc09f628eb53c (patch) | |
tree | e4f15176f61a95b3d24f7c514cf7cb4c76fbb8bf /sys/i386 | |
parent | a82fbe5c0ffe1812ebbef9a1aa50deadd4d4cb8c (diff) | |
download | FreeBSD-src-8d647da1edcc4aad93660da8a41dc09f628eb53c.zip FreeBSD-src-8d647da1edcc4aad93660da8a41dc09f628eb53c.tar.gz |
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.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/bios/apm.c | 1 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 1 | ||||
-rw-r--r-- | sys/i386/include/clock.h | 1 | ||||
-rw-r--r-- | sys/i386/isa/clock.c | 1 | ||||
-rw-r--r-- | sys/i386/isa/pmtimer.c | 1 |
5 files changed, 1 insertions, 4 deletions
diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index a844728..6120723 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -22,7 +22,6 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/conf.h> #include <sys/condvar.h> #include <sys/eventhandler.h> diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 54b5e9d..b1a0d74 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include <sys/buf.h> #include <sys/bus.h> #include <sys/callout.h> -#include <sys/clock.h> #include <sys/cons.h> #include <sys/cpu.h> #include <sys/eventhandler.h> diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h index 3817e32..5a72416 100644 --- a/sys/i386/include/clock.h +++ b/sys/i386/include/clock.h @@ -27,6 +27,7 @@ void i8254_init(void); * Driver to clock driver interface. */ +void startrtclock(void); void timer_restore(void); void init_TSC(void); void init_TSC_tc(void); diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 3c44baf..93a06a3 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/lock.h> #include <sys/kdb.h> #include <sys/mutex.h> diff --git a/sys/i386/isa/pmtimer.c b/sys/i386/isa/pmtimer.c index 87eda2d..1eeac6d 100644 --- a/sys/i386/isa/pmtimer.c +++ b/sys/i386/isa/pmtimer.c @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> -#include <sys/clock.h> #include <sys/kernel.h> #include <sys/module.h> #include <sys/syslog.h> |