diff options
| author | Alejandro Colomar <alx@kernel.org> | 2023-03-17 17:08:01 +0100 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-03-30 15:14:55 +0200 |
| commit | 4131356cdab8d37fc395ca5466a0401c8573380c (patch) | |
| tree | 8c4c6f1c3172358b735b481cbbfdd9cc04b00ed9 /man2/times.2 | |
| parent | fd00f831b52d61a91d59cb3b46182869145d9700 (diff) | |
| download | man-pages-4131356cdab8.tar.gz | |
man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections
- Add a new HISTORY section that covers the history of an API, both
regarding implementations and regarding old standards. This was
previously covered in VERSIONS, and in some cases in STANDARDS.
- Repurpose VERSIONS to cover differing implementations in _current_
systems.
- STANDARDS is reduced to only cover current versions of standards.
That basically means only C11 (C99 has been superseeded by C11; C17
is just a bugfix of C11, so not really a new version), and
POSIX.1-2008 (*-2001 was superseeded by *-2008; *-2017 was just a
bugfix for *-2008). The section also mentions for example 'Linux',
'GNU' or 'BSD' when a non-standard API is Linux- or GNU-only or if
it's (de-facto) standard in the BSDs.
- In some cases content that should go into one of these sections was
in NOTES. Move it from there to where it corresponds.
- In the SYNOPSIS, I added [[deprecated]] in some functions that I
found are deprecated by the relevant standards.
- A few other related changes...
Cc: Oskari Pirhonen <xxc3ncoredxx@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man2/times.2')
| -rw-r--r-- | man2/times.2 | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/man2/times.2 b/man2/times.2 index 6c4d4ce8e9..0c14bd6e98 100644 --- a/man2/times.2 +++ b/man2/times.2 @@ -101,19 +101,25 @@ is set to indicate the error. .B EFAULT .I tms points outside the process's address space. +.SH VERSIONS +On Linux, +the +.I buf +argument can be specified as NULL, +with the result that +.BR times () +just returns a function result. +However, +POSIX does not specify this behavior, +and most +other UNIX implementations require a non-NULL value for +.IR buf . .SH STANDARDS +POSIX.1-2008. +.SH HISTORY POSIX.1-2001, -POSIX.1-2008, SVr4, 4.3BSD. -.SH NOTES -The number of clock ticks per second can be obtained using: -.PP -.in +4n -.EX -sysconf(_SC_CLK_TCK); -.EE -.in .PP In POSIX.1-1996 the symbol \fBCLK_TCK\fP (defined in .IR <time.h> ) @@ -141,28 +147,6 @@ This nonconformance is rectified in Linux 2.6.9 and later. .\" or waitpid() returns the process ID of this terminated child. .PP On Linux, -the -.I buf -argument can be specified as NULL, -with the result that -.BR times () -just returns a function result. -However, -POSIX does not specify this behavior, -and most -other UNIX implementations require a non-NULL value for -.IR buf . -.PP -Note that -.BR clock (3) -also returns a value of type -.IR clock_t , -but this value is measured in units of -.BR CLOCKS_PER_SEC , -not the clock ticks used by -.BR times (). -.PP -On Linux, the \[lq]arbitrary point in the past\[rq] from which the return value of .BR times () @@ -183,7 +167,7 @@ instead. .\" .PP .\" On older systems the number of clock ticks per second is given .\" by the variable HZ. -.SS Historical +.PP SVr1-3 returns .I long and the struct members are of type @@ -196,6 +180,23 @@ for the struct members, because it had no type .I time_t yet. +.SH NOTES +The number of clock ticks per second can be obtained using: +.PP +.in +4n +.EX +sysconf(_SC_CLK_TCK); +.EE +.in +.PP +Note that +.BR clock (3) +also returns a value of type +.IR clock_t , +but this value is measured in units of +.BR CLOCKS_PER_SEC , +not the clock ticks used by +.BR times (). .SH BUGS A limitation of the Linux system call conventions on some architectures (notably i386) means that on Linux 2.6 there is a small time window |
