summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_clock.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve style and wording of comments and sysctl descriptions [1].bz2011-01-091-12/+11
| | | | | | | | Move machdep.ct_debug to debug.clocktime as there was no reason to actually put it under machdep in r216340. Submitted by: bde [1] MFC after: 3 days
* Don't tie ct_debug to bootverbose. Provide a sysctl to turn it on or off.bz2010-12-091-1/+3
| | | | | | Switch the default to always off. Reviewed by: kib
* Fix some more style(9) issues.brucec2010-11-141-3/+3
|
* Fix style(9) issues from r215281 and r215282.brucec2010-11-141-1/+2
| | | | MFC after: 1 week
* Add some descriptions to sys/kern sysctls.brucec2010-11-141-3/+3
| | | | | | PR: kern/148710 Tested by: Chip Camden <sterling at camdensoftware.com> MFC after: 1 week
* Fix an XXX comment by answering 'no'. OS X does not set the day-of-weeknwhitehorn2010-10-171-4/+0
| | | | | | | | counter on SMU-based systems, which causes FreeBSD to reject the RTC time when used in a dual-boot environment. Since we don't use the day-of-week counter anyway, solve this by just not checking that it matches. MFC after: 3 weeks
* Now that all platforms use genclock, shuffle things around slightlyphk2008-04-221-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* fix printf type confusion on amd64phk2008-04-121-2/+3
|
* Emit summaries of struct c(alender)t(ime) <-> struct timespec conversionsphk2008-04-121-2/+27
| | | | | | | | | | under bootverbose. Struct ct is used for setting/reading real time clocks and I'm about to Do Things to some of those, so a bit of preemptive debugging is in order. Remove a pointless __inline.
* If clock_ct_to_ts fails to convert time time from the real time clock,dwmalone2007-07-231-1/+1
| | | | | | | | | print a one line error message. Add some comments on not being able to trust the day of week field (I'll act on these comments in a follow up commit). Approved by: re MFC after: 3 weeks
* Use utc_offset() where applicable, and hide the internals of itphk2006-10-021-3/+3
| | | | as static variables.
* Introduce utc_offset() to capture a calculation currently done all over thephk2006-10-021-0/+7
| | | | place.
* Move tz_minuteswest and tz_dsttime to subr_clock.cphk2006-10-021-0/+3
|
* Second part of a little cleanup in the calendar/timezone/RTC handling.phk2006-10-021-143/+22
| | | | | | | | | | | Split subr_clock.c in two parts (by repo-copy): subr_clock.c contains generic RTC and calendaric stuff. etc. subr_rtc.c contains the newbus'ified RTC interface. Centralize the machdep.{adjkerntz,disable_rtc_set,wall_cmos_clock} sysctls and associated variables into subr_clock.c. They are not machine dependent and we have generic code that relies on being present so they are not even optional.
* Remove more straggling CPU_ macro referencesphk2006-05-111-4/+4
|
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-061-1/+1
|
* Remove advertising clause from University of California Regent's license,imp2004-04-051-4/+0
| | | | | | per letter dated July 22, 1999. Approved by: core
* Use __FBSDID().obrien2003-06-111-2/+4
|
* Split the global timezone structure into two integer fields tophk2003-02-031-2/+2
| | | | | | | | | | prevent the compiler from optimizing assignments into byte-copy operations which might make access to the individual fields non-atomic. Use the individual fields throughout, and don't bother locking them with Giant: it is no longer needed. Inspired by: tjr
* Use the CPU_* OID constants instead of OID_AUTO for the clock-relatedtmm2002-08-071-3/+6
| | | | sysctls for compatability with old applications.
* Add a generic implementation of inittodr() and resettodr(), as well astmm2002-04-041-0/+316
a set of helper routines to deal with real-time clocks. The generic functions access the clock diver using a kobj interface. This is intended to reduce code reduplication and make it easy to support more than one clock model on a single architecture. This code is currently only used on sparc64, but it is planned to convert the code of the other architectures to it later.
OpenPOWER on IntegriCloud