OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.10 / (download) - annotate - [select for diffs], Tue Oct 25 16:30:30 2022 UTC (19 months, 1 week ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.9: +28 -7 lines
Diff to previous 1.9 (colored)

Move CLOCKS_PER_SEC to sys/_time.h so the kernel has access to it.
This will be used in waitid(2) to set si_utime and si_stime.
The definition of struct timespec also moves from time.h to sys/_time.h
for struct itimerspec.  OK kettenis@

Revision 1.9 / (download) - annotate - [select for diffs], Mon Dec 18 05:51:53 2017 UTC (6 years, 5 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

Add the CLOCK_BOOTTIME clockid for use with clock_gettime(2)
and put it to use in userspace in lieu of the kern.boottime
sysctl.

Its absolute value is the time that has elapsed since the
system booted, i.e., the system uptime.

Use in top(1), w(1), and snmpd(8) eliminates a race with
settimeofday(2), adjtime(2), etc. inherent to deriving the
system uptime via the kern.boottime sysctl.

Product of a great deal of discussion/revision with jca@, tb@,
and guenther@.

ok tb@ jca@ guenther@ dlg@ mlarkin@ tom@

Revision 1.8 / (download) - annotate - [select for diffs], Sat Sep 3 15:06:06 2016 UTC (7 years, 9 months ago) by akfaew
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.7: +1 -3 lines
Diff to previous 1.7 (colored)

Remove ticket lock support from thrsleep. It's unused.

OK guenther@ mpi@ tedu@

Revision 1.7 / (download) - annotate - [select for diffs], Thu Oct 16 15:50:49 2014 UTC (9 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.6: +1 -2 lines
Diff to previous 1.6 (colored)

Remove references to unimplemented CLOCK_VIRTUAL.  It is non-standard
and existing implementations vary as to whether it returns time for
the calling thread or the entire process.  OK kettenis@

Revision 1.6 / (download) - annotate - [select for diffs], Sun Oct 6 01:27:49 2013 UTC (10 years, 7 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.5: +4 -1 lines
Diff to previous 1.5 (colored)

Add CLOCK_UPTIME, a clock which measures time-running-not-suspended, so
that mlarkin@ can fix programs that report rates-over-uptime.

ok kettenis@
manpage corrections jmc@ (which I've probably broken again)

Revision 1.5 / (download) - annotate - [select for diffs], Sat Sep 14 01:35:02 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
Changes since 1.4: +1 -7 lines
Diff to previous 1.4 (colored)

Snapshots for all archs have been built, so remove the T32 code

Revision 1.4 / (download) - annotate - [select for diffs], Tue Aug 13 05:52:26 2013 UTC (10 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.3: +7 -1 lines
Diff to previous 1.3 (colored)

Switch time_t, ino_t, clock_t, and struct kevent's ident and data
members to 64bit types.  Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments.  Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir.  Build perl with -DBIG_TIME.

Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.

DANGER: ABI incompatibility.  Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.

Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jun 17 19:11:54 2013 UTC (10 years, 11 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.2: +16 -5 lines
Diff to previous 1.2 (colored)

Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and
{clock,pthread}_getcpuclockid() functions.

Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@
ok matthew@

Revision 1.2 / (download) - annotate - [select for diffs], Thu May 10 19:13:12 2012 UTC (12 years ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.1: +10 -1 lines
Diff to previous 1.1 (colored)

Recongnize that:

* strptime(3) was introduced in XPG 4.0
* clock_gettime(3) and friends were introduced in 1003.1b-1993
* asctime_r(3) and friends were introduced in 1003.1c-1995

and conditionally provide prototypes and associated types accordingly.
This makes our <time.h> standards compliant except for some functions that are
still missing.

ok guenther@

Revision 1.1 / (download) - annotate - [select for diffs], Mon May 7 22:34:01 2012 UTC (12 years ago) by kettenis
Branch: MAIN

Once more the people behind POSIX didn't think and put clock_gettime(2) and
friends in <time.h>.  The kernel needs access to the associated #defines, but
can't get them from <time.h>, so introduce a new header <sys/_time.h> and
include that from <time.h> for userland and <sys/time.h> for the kernel.

ok matthew@, guenther@, millert@

This form allows you to request diff's 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.