DragonFly BSD

CVS log for src/sys/sys/time.h

[BACK] Up to [DragonFly] / src / sys / sys

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.20: download - view: text, markup, annotated - select for diffs
Wed Jun 18 09:36:07 2008 UTC (6 years, 4 months ago) by hasso
Branches: MAIN
CVS tags: HEAD, DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_Preview
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +1 -9 lines
Move timeval struct into its own header and include it from headers where
needed or defined by standards plus from sys/types.h. This makes several
pkgsrc packages more happy.

Including just sys/types.h to use struct timeval works there in every BSD,
Linux and Solaris, so we can't just ignore it.

Also make struct timeval standards compilant in progress.

Inspired-by: FreeBSD

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri May 30 09:39:46 2008 UTC (6 years, 5 months ago) by corecode
Branches: MAIN
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +2 -0 lines
Include sys/select.h to conform to SUS.

Noticed-by:  hasso@

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Apr 2 14:16:15 2008 UTC (6 years, 7 months ago) by sephe
Branches: MAIN
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +2 -2 lines
Constify second parameter of timeval{add,sub}()

Revision 1.16.4.1: download - view: text, markup, annotated - select for diffs
Tue Jul 31 22:40:50 2007 UTC (7 years, 3 months ago) by dillon
Branches: DragonFly_RELEASE_1_10
CVS tags: DragonFly_RELEASE_1_10_Slip
Diff to: previous 1.16: preferred, unified; next MAIN 1.17: preferred, unified
Changes since revision 1.16: +13 -0 lines
Synchronize all changes made in HEAD to date with the 1.10 release branch.

* usbdevs update
* header file fixes
* vinum root
* vinum device I/O fixes
* MD fixes
* New PCI ids for netif rum and ural
* New USB uplcom ids
* linux exec memory leak
* devclass ordering fixes (sound devices)
* rate-limited kprintf support (filesystem full console spams)
* msdosfs fixes
* Manual page work

Revision 1.17: download - view: text, markup, annotated - select for diffs
Mon Jul 30 21:40:31 2007 UTC (7 years, 3 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +13 -0 lines
Introduce krateprintf(), a rate-controlled kprintf(), and the related
struct krate structure.  This takes all the effort out of outputting
rate-limited warnings to the console.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Jan 7 00:42:55 2007 UTC (7 years, 9 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Branch point for: DragonFly_RELEASE_1_10
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +4 -2 lines
Make libc prototypes available for kernel builds.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Apr 14 15:05:29 2005 UTC (9 years, 6 months ago) by eirikn
Branches: MAIN
CVS tags: DragonFly_Stable, DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6, DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +2 -2 lines
A few more instances of leaf that should be leap.

Noticed by: Bart Thate <dunker@freebsd.nl>

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Apr 14 07:55:36 2005 UTC (9 years, 6 months ago) by joerg
Branches: MAIN
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +10 -0 lines
Simplified NTP kernel interface:
- kern.ntp.delta gives the delta to apply (ns)
- kern.ntp.tick_delta is the correction applied in each tick (ns)
- kern.ntp.default_tick_delta is the default correction for each tick (ns)
- kern.ntp.big_delta is the threshold for kern.ntp.delta to use
  10x kern.ntp.default_tick_delta, not the normal value
- kern.ntp.adjust can be used to change the current value of kern.ntp.delta
  relatively.
- kern.ntp.next_leaf_second specifies the time_t of the next leaf second change,
  kern.ntp.insert_leaf_second != 0 means a leaf second is inserted, otherwise
  it is removed

All ntp_* variables are manipulated on CPU #0 with the exception of
set_timeofday. It just sets ntp_delta to 0, which is fine for the moment.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Mar 15 01:12:21 2005 UTC (9 years, 7 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +1 -0 lines
Implement CLOCK_MONOTONIC using getnanouptime(), which in DragonFly is
guarenteed to be monotonically increasing.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Mar 13 21:33:48 2005 UTC (9 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +1 -0 lines
Add a function that returns an approximate time_t for realtime for
routines which do not need the exactness of microtime().

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Dec 22 11:01:49 2004 UTC (9 years, 10 months ago) by joerg
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +2 -0 lines
Add new structures for exporting the cputime statistics via 64 bit counters
and redo the timer frequence export.
Provide the interface glue for libkinfo and libkcore.
Additionally provide interfaces to query ccpu, the number of cpus, tk_nin
and tk_nout.
Remove those fields from devstat.h's struct statinfo.
Remove kvm dependency of rpc.rstatd by using the newly added libkinfo
functions and the sysctl interface for vmmeter.
Use the new interface in systat, the iostat part is now kvm-free.
Use kinfo_get_sched_stathz in time.
Use the kinfo interface for everything beside getting the actual process list
in top. This also removes the Last PID, which could be added back easily.
Since the feature is not that useful and breaks e.g. the jail isolation,
I haven't added a sysctl to read nextpid.
Use the kinfo interface in vmstat.
Use the kinfo interface in iostat. iostat is now kvm-free and not
setgid kmem anymore. This also means that iostat can't be applied to
coredump anymore. If this functionality is important, the kcore kinfo wrapper
can be added easily.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Nov 20 20:25:13 2004 UTC (9 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +0 -1 lines
Add code to the BIOS VM86 emulator to detect writes to the 8254.  If a
write is detected the 8254 is reset after the bios call returns and the
event is reported.  Some bioses, in particular video bioses, uses timer 2
for timing things.  We need timer 2 for our master clock.

Remove restoreclocks().  This was causing gd_cpuclock_base to reverse index
and jump the time ahead an hour with a flurry of hardclock interrupts.

Introduce a new systimer API call, systimer_init_periodic_nq(), which
installs a non-queued periodic systimer.  Non-queued means that if multiple
events built-up (due to an 8254 glitch, sleep, or other event), only one
event will be reported.

This should fix the BIOS/8254 glitching, the 'hour jump' problem, and
hopefully other timer jumping issues as well.

Bugs-reported-by: Andreas Hauser <andy@splashground.de>,
		Jonathon McKitrick <jcm@FreeBSD-uk.eu.org>,
		and others

Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Aug 2 23:20:31 2004 UTC (10 years, 3 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +1 -0 lines
Make doubly sure that timer2 is not used for speaker operation.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Jan 30 05:42:18 2004 UTC (10 years, 9 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +2 -84 lines
This commit represents a major revamping of the clock interrupt and timebase
infrastructure in DragonFly.

* Rip out the existing 8254 timer 0 code, and also disable the use of
  Timer 2 (which means that the PC speaker will no longer go beep).  Timer 0
  used to represent a periodic interrupt and a great deal of code was in
  place to attempt to obtain a timebase off of that periodic interrupt.

  Timer 0 is now used in software retriggerable one-shot mode to produce
  variable-delay interrupts.  A new hardware interrupt clock abstraction
  called SYSTIMERS has been introduced which allows threads to register
  periodic or one-shot interrupt/IPI callbacks at approximately 1uS
  granularity.

  Timer 2 is now set in continuous periodic mode with a period of 65536
  and provides the timebase for the system, abstracted to 32 bits.

  All the old platform-integrated hardclock() and statclock() code has
  been rewritten.  The old IPI forwarding code has been #if 0'd out and
  will soon be entirely removed (the systimer abstraction takes care of
  multi-cpu registrations now).  The architecture-specific clkintr() now
  simply calls an entry point into the systimer and provides a Timer 0
  reload and Timer 2 timebase function API.

* On both UP and SMP systems, cpus register systimer interrupts for the Hz
  interrupt, the stat interrupt, and the scheduler round-robin interrupt.
  The abstraction is carefully designed to allow multiple interrupts occuring
  at the same time to be processed in a single hardware interrupt.  While
  we currently use IPI's to distribute requested interrupts from other cpu's,
  the intent is to use the abstraction to take advantage of per-cpu timers
  when available (e.g. on the LAPIC) in the future.

  systimer interrupts run OUTSIDE THE MP LOCK.  Entry points may be called
  from the hard interrupt or via an IPI message (IPI messages have always
  run outside the MP lock).

* Rip out timecounters and disable alternative timecounter code for other
  time sources.  This is temporary.  Eventually other time sources, such as
  the TSC, will be reintegrated as independant, parallel-running entities.
  There will be no 'time switching' per-say, subsystems will be able to
  select which timebase they wish to use.  It is desireable to reintegrate
  at least the TSC to improve [get]{micro,nano}[up]time() performance.

  WARNING: PPS events may not work properly.  They were not removed, but
  they have not been retested with the new code either.

* Remove spl protection around [get]{micro,nano}[up]time() calls, they are
  now internally protected.

* Use uptime instead of realtime in certain CAM timeout tests

* Remove struct clockframe.  Use struct intrframe everywhere where clockframe
  used to be used.

* Replace most splstatclock() protections with crit_*() protections, because
  such protections must now also protect against IPI messaging interrupts.

* Add fields to the per-cpu globaldata structure to access timebase related
  information using only a critical section rather then a mutex.  However,
  the 8254 Timer 2 access code still uses spin locks.  More work needs to
  be done here, the 'realtime' correction is still done in a single global
  'struct timespec basetime' structure.

* Remove the CLKINTR_PENDING icu and apic interrupt hacks.

* Augment the IPI Messaging code to make an intrframe available to callbacks.

* Document 8254 timing modes in i386/sai/timerreg.h.  Note that at the
  moment we assume an 8254 instead of an 8253 as we are using TIMER_SWSTROBE
  mode.  This may or may not have to be changed to an 8253 mode.

* Integrate the NTP correction code into the new timebase subsystem.

* Separate boottime from basettime.  Once boottime is believed to be stable
  it is no longer effected by NTP or other time corrections.

CAVETS:

	* PC speaker no longer works

	* Profiling interrupt rate not increased (it needs work to be
	  made operational on a per-cpu basis rather then system-wide).

	* The native timebase API is function-based, but currently hardwired.

	* There might or might not be issues with 486 systems due to the
	  timer mode I am using.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Jan 7 11:04:20 2004 UTC (10 years, 9 months ago) by dillon
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +2 -1 lines
tvtohz() was originally designed for tsleep() and timeout() operations but
it is also used to time nanosleep() ops.  The problem is that in order to
compensate for the fact that a clock interrupt might occur just after a
thread blocks or registers a timeout, this function effectively added +1
to the returned value plus added another +1 for timeouts that were not
integer multiples if the clock interrupt frequency.

Split tvtohz() into two routines: tvtohz_low() and tvtohz_high().
tvtohz_low() does not do any compensation, tvtohz_high() does.

Add the kern.sleep_hardloop sysctl, which defaults to 0 (off).  If set to
1 this will cause nanosleep() to attempt to time exactly the requested
interval (which could cost more cpu) rather then rounding it off to a
multiple of hz.  If set to 2 nanosleep() will only do the more rigid
timing for requests less then 1 second.   Also change the normal hz-baesd
case to only compensate by +1, not +2, in order to improve accuracy.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Nov 22 19:30:57 2003 UTC (10 years, 11 months ago) by asmodai
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +1 -1 lines
Properly spell compatible and compatibility.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Nov 9 02:22:37 2003 UTC (10 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +2 -0 lines
Core integer types header file reorganization stage 1/2: Create and/or modify
intttypes.h and stdint.h plus the opaque underlying support in sys/ and
machine/ according to the OpenGroup specifications.

These changes are loosely based on FreeBSD-5 but use far saner type names
and include dependancies.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Aug 20 07:31:21 2003 UTC (11 years, 2 months ago) by rob
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +29 -29 lines
__P() != wanted, begin removal, in order to preserve white space this needs
to be done by hand, as I accidently killed a source tree that I had gotten
this far on. I'm committing this now, LINT and GENERIC both build with
these changes, there are many more to come.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Jul 28 04:29:12 2003 UTC (11 years, 3 months ago) by hmp
Branches: MAIN
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +3 -1 lines
Merge from FreeBSD:

	- ppsratecheck() - packets/events per second limitation
	- ratecheck - time based rate-limiting

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:59 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +1 -0 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:55:53 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.42

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options