From dae872dd27ca40a777d61d7438b9e2cc9e4aaaf9 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 18 Aug 2021 07:38:15 +0200 Subject: [PATCH] readv.2, pthread_tryjoin_np.3, stailq.3, strlen.3, wcslen.3: Arrange .SH sections in correct order Signed-off-by: Michael Kerrisk --- man2/readv.2 | 24 ++++++++++++------------ man3/pthread_tryjoin_np.3 | 24 ++++++++++++------------ man3/stailq.3 | 18 +++++++++--------- man3/strlen.3 | 4 ++-- man3/wcslen.3 | 4 ++-- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/man2/readv.2 b/man2/readv.2 index c066c73a5..a48321539 100644 --- a/man2/readv.2 +++ b/man2/readv.2 @@ -406,6 +406,18 @@ that the system is running a Linux kernel older than version 2.6.18 And since glibc 2.20 (which requires a minimum Linux kernel version of 2.6.32), the glibc wrapper functions always just directly invoke the system calls. +.SH BUGS +Linux 5.9 and 5.10 have a bug where +.BR preadv2() +with the +.BR RWF_NOWAIT +flag may return 0 even when not at end of file. +.\" See +.\" +.\" The bug was introduced in +.\" efa8480a831 fs: RWF_NOWAIT should imply IOCB_NOIO +.\"and fixed in +.\" 06c0444290 mm/filemap.c: generic_file_buffered_read() now uses find_get_pages_contig .SH EXAMPLES The following code sample demonstrates the use of .BR writev (): @@ -425,18 +437,6 @@ iov[1].iov_len = strlen(str1); nwritten = writev(STDOUT_FILENO, iov, 2); .EE .in -.SH BUGS -Linux 5.9 and 5.10 have a bug where -.BR preadv2() -with the -.BR RWF_NOWAIT -flag may return 0 even when not at end of file. -.\" See -.\" -.\" The bug was introduced in -.\" efa8480a831 fs: RWF_NOWAIT should imply IOCB_NOIO -.\"and fixed in -.\" 06c0444290 mm/filemap.c: generic_file_buffered_read() now uses find_get_pages_contig .SH SEE ALSO .BR pread (2), .BR read (2), diff --git a/man3/pthread_tryjoin_np.3 b/man3/pthread_tryjoin_np.3 index c94ed95e3..0c6f32dd7 100644 --- a/man3/pthread_tryjoin_np.3 +++ b/man3/pthread_tryjoin_np.3 @@ -140,6 +140,18 @@ T} Thread safety MT-Safe .SH CONFORMING TO These functions are nonstandard GNU extensions; hence the suffix "_np" (nonportable) in the names. +.SH BUGS +The +.BR pthread_timedjoin_np () +function measures time by internally calculating a relative sleep interval +that is then measured against the +.BR CLOCK_MONOTONIC +clock instead of the +.BR CLOCK_REALTIME +clock. +Consequently, the timeout is unaffected by discontinuous changes to the +.BR CLOCK_REALTIME +clock. .SH EXAMPLES The following code waits to join for up to 5 seconds: .PP @@ -162,18 +174,6 @@ if (s != 0) { } .EE .in -.SH BUGS -The -.BR pthread_timedjoin_np () -function measures time by internally calculating a relative sleep interval -that is then measured against the -.BR CLOCK_MONOTONIC -clock instead of the -.BR CLOCK_REALTIME -clock. -Consequently, the timeout is unaffected by discontinuous changes to the -.BR CLOCK_REALTIME -clock. .SH SEE ALSO .BR clock_gettime (2), .BR pthread_exit (3), diff --git a/man3/stailq.3 b/man3/stailq.3 index 085b7aeef..0392e17dd 100644 --- a/man3/stailq.3 +++ b/man3/stailq.3 @@ -309,6 +309,15 @@ returns an initializer that can be assigned to the queue Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008. Present on the BSDs (STAILQ macros first appeared in 4.4BSD). +.SH NOTES +Some BSDs provide SIMPLEQ instead of STAILQ. +They are identical, but for historical reasons +they were named differently on different BSDs. +STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. +For compatibility reasons, some systems provide both sets of macros. +Glibc provides both STAILQ and SIMPLEQ, +which are identical except for a missing SIMPLEQ equivalent to +.BR STAILQ_CONCAT (). .SH BUGS .BR STAILQ_FOREACH () doesn't allow @@ -321,15 +330,6 @@ fixes this limitation by allowing .I var to safely be removed from the list and freed from within the loop without interfering with the traversal. -.SH NOTES -Some BSDs provide SIMPLEQ instead of STAILQ. -They are identical, but for historical reasons -they were named differently on different BSDs. -STAILQ originated on FreeBSD, and SIMPLEQ originated on NetBSD. -For compatibility reasons, some systems provide both sets of macros. -Glibc provides both STAILQ and SIMPLEQ, -which are identical except for a missing SIMPLEQ equivalent to -.BR STAILQ_CONCAT (). .SH EXAMPLES .EX #include diff --git a/man3/strlen.3 b/man3/strlen.3 index ca7a7d188..27dc9f17d 100644 --- a/man3/strlen.3 +++ b/man3/strlen.3 @@ -64,13 +64,13 @@ T} Thread safety MT-Safe .hy .ad .sp 1 +.SH CONFORMING TO +POSIX.1-2001, POSIX.1-2008, C89, C99, C11, SVr4, 4.3BSD. .SH NOTES In cases where the input buffer may not contain a terminating null byte, .BR strnlen (3) should be used instead. -.SH CONFORMING TO -POSIX.1-2001, POSIX.1-2008, C89, C99, C11, SVr4, 4.3BSD. .SH SEE ALSO .BR string (3), .BR strnlen (3), diff --git a/man3/wcslen.3 b/man3/wcslen.3 index 24dca8e55..52c450c80 100644 --- a/man3/wcslen.3 +++ b/man3/wcslen.3 @@ -56,12 +56,12 @@ T} Thread safety MT-Safe .hy .ad .sp 1 +.SH CONFORMING TO +POSIX.1-2001, POSIX.1-2008, C99. .SH NOTES In cases where the input buffer may not contain a terminating null wide character, .BR wcsnlen (3) should be used instead. -.SH CONFORMING TO -POSIX.1-2001, POSIX.1-2008, C99. .SH SEE ALSO .BR strlen (3)