Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src
Module Name: src
Committed By: riastradh
Date: Mon Jul 17 12:55:21 UTC 2023
Modified Files:
src/share/man/man9: time_second.9
src/sys/kern: kern_tc.c
src/sys/sys: timevar.h
Log Message:
kern: Make time_second and time_uptime macros that work atomically.
These use atomic load on platforms with atomic 64-bit load, and
seqlocks on platforms without.
This has the unfortunate side effect of slightly reducing the real
times available on 32-bit platforms, from ending some time in the
year 584942417218 AD, available on 64-bit platforms, to ending some
time in the year 584942417355 AD. But during that slightly shorter
time, 32-bit platforms can avoid bugs arising from non-atomic access
to time_uptime and time_second.
Note: All platforms still have non-atomic access problems for
bintime, binuptime, nanotime, nanouptime, &c. This can be addressed
by putting a seqlock around timebasebin and possibly some other
variable -- to be done in a later change.
XXX kernel ABI change -- deleting symbols
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man9/time_second.9
cvs rdiff -u -r1.62 -r1.63 src/sys/kern/kern_tc.c
cvs rdiff -u -r1.49 -r1.50 src/sys/sys/timevar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index