about summary refs log tree commit diff
path: root/nptl/pthread_mutexattr_setprioceiling.c
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2024-10-28 22:22:26 +0000
committerJoseph Myers <josmyers@redhat.com>2024-10-28 22:22:26 +0000
commit7fe1fde499507126f7de10ebf12fecaf77ae6602 (patch)
tree4b77b5d997501d738df2221c5981a2ea30271c29 /nptl/pthread_mutexattr_setprioceiling.c
parentf144dae4a113dc714d9f0feea5ee6f099c64a179 (diff)
downloadglibc-7fe1fde499507126f7de10ebf12fecaf77ae6602.tar.gz
glibc-7fe1fde499507126f7de10ebf12fecaf77ae6602.tar.xz
glibc-7fe1fde499507126f7de10ebf12fecaf77ae6602.zip
Document further requirement on mixing streams / file descriptors
The gilbc manual has some documentation in llio.texi of requirements
for moving between I/O on FILE * streams and file descriptors on the
same open file description.

The documentation of what must be done on a FILE * stream to move from
it to either a file descriptor or another FILE * for the same open
file description seems to match POSIX.  However, there is an
additional requirement in POSIX on the *second* of the two handles
being moved between, which is not mentioned in the glibc manual: "If
any previous active handle has been used by a function that explicitly
changed the file offset, except as required above for the first
handle, the application shall perform an lseek() or fseek() (as
appropriate to the type of handle) to an appropriate location.".

Document this requirement on seeking in the glibc manual, limited to
the case that seems relevant to glibc (the new channel is a previously
active stream, on which the seeking previously occurred).  Note that
I'm not sure what the "except as required above for the first handle"
is meant to be about, so I haven't documented anything for it.  As far
as I can tell, nothing specified for moving from the first handle
actually list calling a seek function as one of the steps to be done.
(Current POSIX doesn't seem to have any relevant rationale for this
section.  The rationale in the 1996 edition says "In requiring the
seek to an appropriate location for the new handle, the application is
required to know what it is doing if it is passing streams with seeks
involved.  If the required seek is not done, the results are undefined
(and in fact the program probably will not work on many common
implementations)." - which also doesn't help in understanding the
purpose of "except as required above for the first handle".)

Tested with "make info" and "make pdf".
Diffstat (limited to 'nptl/pthread_mutexattr_setprioceiling.c')
0 files changed, 0 insertions, 0 deletions