Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Remove all unused atomics. Replace uses of catomic_increment and
catomic_decrement with atomic_fetch_add_relaxed which maps to a standard
compiler builtin. Relaxed memory ordering is correct for simple counters
since they only need atomicity.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
Linux 6.14 adds the new flag for uncached buffered IO on a filesystem
supporting it.
This caused two test failures as these tests expected the flag
0x00000080 is unused. Add the flag definition to fix these tests on
Linux >= 6.14:
FAIL: misc/tst-preadvwritev2
FAIL: misc/tst-preadvwritev64v2
The test failures were not detected in routine test suite runs because
normally we create the test file in /tmp, where a tmpfs is usually
mounted, and tmpfs does not support this flag. But it can be reproduced
with TMPDIR set to some directory in an ext4 file system.
Link: https://git.kernel.org/torvalds/c/af6505e5745b
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
* manual/message.texi (Advanced gettext functions): Refer to
libc-alpha@sourceware.org instead of bug-glibc-manual@gnu.org which no
longer exists.
* NEWS: Likewise.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
The select function, fd_set, and FD_* macros were standardized by POSIX
in the sys/select.h header. They are still defined in sys/types.h if
__USE_MISC is defined, but we should recommend the more portable and
standardized sys/select.h.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
The original example works on glibc since sys/time.h includes
sys/select.h. However, since POSIX requires that select is defined in
sys/select.h this change makes the example more portable.
Reported by Gavin Smith <gavinsmith0123@gmail.com> in:
<https://lists.gnu.org/archive/html/bug-texinfo/2025-07/msg00091.html>.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
The getsubopt function was an XSI extension since POSIX issue 4 until it
was added to Base in POSIX Issue 7. This also adds the 'restrict'
qualifier to the arguments as done in POSIX.1-2024, and has been the
case in glibc.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
|
|
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
|
|
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
|
|
And add extra checks to enable for binutils 2.45 and if the architecture
explicitly enables it. When SFrame is disabled, all the related code
is also not enabled for backtrace() and _dl_find_object(), so SFrame
backtracking is not used even if the binary has the SFrame segment.
This patch also adds some other related fixes:
* Fixed an issue with AC_CHECK_PROG_VER, where the READELF_SFRAME
usage prevented specifying a different readelf through READELF
environment variable at configure time.
* Add an extra arch-specific internal definition,
libc_cv_support_sframe, to disable --enable-sframe on architectures
that have binutils but not glibc support (s390x).
* Renamed the tests without the .sframe segment and move the
tst-backtrace1 from pthread to debug.
* Use the built compiler strip to remove the .sframe segment,
instead of the system one (which might not support SFrame).
Checked on x86_64-linux-gnu and aarch64-linux-gnu.
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Fixes commit 5dd2a19ad5218261cee064 ("termios: manual: improve the
explanation of various tty concepts") and commit c744519bad8106769760
("termios: manual: document the SPEED_MAX and BAUD_MAX constants").
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
|
|
Add the SPEED_MAX and BAUD_MAX constants to the manual.
[ v3: drop leading underscores ]
Signed-off-by: "H. Peter Anvin" (Intel) <hpa@zytor.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
|
|
It is a lot easier to understand the meaning of the tty interface if
it is explained from the beginning as conceptually emulating an RS232
serial port. This greatly simplifies the discussions of specific
items like the meaning of line speed.
Distinguish between "modem disconnect request" (deasserting DTR) and
"modem disconnect" (DCD deasserted). Conflating the two terms is
confusing, especially for non-RS232 devices. In particular, on most
systems, a pseudo-terminal will *not* respond to a modem disconnect
request by triggering a modem disconnect event for the purpose of the
HUPCL flag.
It is not necessarily true that the line speed has no effect on
non-serial port devices: e.g. an SPI port may interpret it as the
clock frequency to use; however, SPI does not use asynchronous framing
bits, instead synchronization is handled by the SS# wire. Similarly,
it is common but not by any means universal for interfaces that employ
various forms of fixed data to symbol rate encodings to encode the
data link layer bit rate rather than the physical symbol rate, which
may be higher (e.g. 8B10B) or lower (e.g. QAM/Trellis), without the
encoding or framing overhead.
Finally, a handful of devices use the line rate for entirely
nonstandard purposes. One example is Arduino USB interfaces, which
often interprets changing the baud rate to 1200 baud as a command to
reset the device.
[ v2: removed a bogus stray chunk from editing ]
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
The function cfsetospeed() is defined twice in the manual. Remove the
one that seems out of place.
Signed-off-by: "H. Peter Anvin" (Intel) <hpa@zytor.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
|
|
Fix a typo in the manual: tcsetattr misspelled as tcsettattr.
Signed-off-by: "H. Peter Anvin" (Intel) <hpa@zytor.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
|
|
Enable SFrame stack track information. The --enable-sframe option
allows the glibc build to compile with SFrame stack track
information. Thus, enabling glibc's backtrace to work within glibc.
Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
Reviewed-by: DJ Delorie <dj@redhat.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
The SFrame provides information to be able to do stack trace is now
well defined and implemented in Binutils 2.41. The format simply
contains enough information to be able to do stack trace given a
program counter (PC) value, the stack pointer, and the frame pointer.
The SFrame information is stored in a .sframe ELF section, which is
loaded into its own PT_GNU_SFRAME segment. We consider for this support
SFrame version 2.
This patch adds the bits to _dl_find_object to recognize and store in
struct dl_find_object the necessary info about SFrame section.
Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
The fstatat behaviour when the target is a dangling symlink is different
if flags contains AT_SYMLINK_NOFOLLOW or not.
Add a test for this and document it.
|
|
Document the fstatat behaviour leading to a ENOENT errno, and extend
tests to test the case where filename does not exist.
Signed-off-by: Matteo Croce <teknoraver@meta.com>
|
|
Texinfo 7.2 began warning about the '.info' suffix in the manual names
passed to @ref and similar commands. They eventually plan to stop
stripping the '.info' suffix internally which will lead to broken links
in the manuals without this change.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
|
|
Clarify the meaning of renameat arguments.
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
|
|
This reverts commit abc2e954af77f8d10f4f54754520814590e79830.
Reason for revert: Wrong version of the patch.
|
|
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
|
|
Clarify the meaning of renameat arguments.
Signed-off-by: Jitka Obselkova <jobselko@redhat.com>
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
|
|
Add an explicitly numeric interface for baudrate setting. For glibc,
this only announces what is a fair accompli, but this is a plausible
way forward for standardization, and may be possible to infill on
non-compliant systems. The POSIX committee has stated:
[https://www.austingroupbugs.net/view.php?id=1916#c7135]
A future version of this standard is expected to add at least
the following symbolic constants for use as values of objects
of type speed_t: B57600, B115200, B230400, B460800, and
B921600.
Implementations are encouraged to propose additional
interfaces which will make it possible to set and query a
wider range of speeds than just those enumerated by the
constants beginning with B. If a set of common interfaces
emerges between several implementations, a future version of
this standard will likely add those interfaces.
This is exactly that interface.
The use of the term "baud" is due to the need to have a term
contrasting "speed", and it is already well established as a legacy
term -- including in the names of the legacy Bxxx
constants. Futhermore, it *is* valid from the point of view that the
termios interface fundamentally emulates an RS-232 serial port as far
as the application software is concerned.
The documentation states that for the current version of glibc,
speed_t == baud_t, but explicitly declares that this may not be the
case in the future.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
Add all the Bxxx constants defined in the now-generic
<bits/termios-baud.h> in the manual.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
|
|
Add an illustrative example of how to express 'nanosleep' in terms of
'clock_nanosleep'.
|
|
Document futimens and utimensat. Also document the EINVAL error
condition for futimes. It is inherited by futimens and utimensat as
well.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Improve the clarity of the paragraphs describing common flags and add a
list of common error conditions for descriptor-relative functions.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Add documentation for EAFNOSUPPORT error code returned, and the possible
return values on non-success.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Add documentation for ENODEV error code returned and refer to 'socket'
for further possible codes from the underlying function call.
While changing the text clarify the description by mentioning 'ifname'.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Add documentation for ENXIO error code returned and refer to 'socket'
for further possible codes from the underlying function call.
While changing the text clarify the description by mentioning 'ifname'
and replace @code tags with @var ones where referring to a function
parameter.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Commit 1a3d8f2201d4d613401ce5be9a283f4f28c43093 incorrectly described
'clock_nanosleep' as having the same return values as 'nanosleep'. Fix
this, clarifying that 'clock_nanosleep' returns a positive error number
upon failure instead of setting 'errno'. Also clarify that 'nanosleep'
returns '-1' upon error.
Fixes: 1a3d8f2201d4d613401ce5be9a283f4f28c43093
Reported-by: Mark Harris <mark.hsj@gmail.com>
Reviewed-by: Mark Harris <mark.hsj@gmail.com>
|
|
Make minor clarifications in the documentation for 'nanosleep' and add
an entry for 'clock_nanosleep' as a generalized variant of the former
function that allows clock selection.
Reviewed-by: Maciej W. Rozycki <macro@redhat.com>
|
|
The GNU Coding Standards demand that 'illegal' only be used to refer to
activities prohibited by law. Replace it with 'invalid' accordingly in
the description of the EINVAL error condition for 'nanosleep'.
|
|
Remove 'consult' duplication appearing in Extensible Scheduling section.
|
|
Add documentation for EAFNOSUPPORT and ENOSPC error codes returned, and
the return value on failure.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Add missing EAFNOSUPPORT, ESOCKTNOSUPPORT, EPROTOTYPE, EINVAL, EPERM,
and ENOMEM error codes, and adjust existing descriptions accordingly.
On Linux either ENOBUFS or ENOMEM is returned in the case of a memory
allocation failure, depending on the namespace requested, e.g. AF_INET
returns ENOMEM while AF_INET6 returns ENOBUFS, so document these codes
as alternatives.
Similarly EPERM is returned rather than EACCES on Linux, so document
these codes as alternatives as well. We might want to convert EPERM to
EACCES for POSIX compliance, but it is beyond the scope of this change,
and software has to expect either anyway, owing to the long-established
practice.
Finally ESOCKTNOSUPPORT is returned rather than EPROTONOSUPPORT for an
unsupported style except for the AF_QIPCRTR namespace where EPROTOTYPE
is used, so document these codes as alternatives too.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Also use this macro in one of the examples.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
|
|
|
|
Signed-off-by: Tomas Volf <~@wolfsden.cz>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
|