Go to file
Malte Skarupke 91bb902f58 nptl: Use all of g1_start and g_signals
The LSB of g_signals was unused. The LSB of g1_start was used to indicate
which group is G2. This was used to always go to sleep in pthread_cond_wait
if a waiter is in G2. A comment earlier in the file says that this is not
correct to do:

 "Waiters cannot determine whether they are currently in G2 or G1 -- but they
  do not have to because all they are interested in is whether there are
  available signals"

I either would have had to update the comment, or get rid of the check. I
chose to get rid of the check. In fact I don't quite know why it was there.
There will never be available signals for group G2, so we didn't need the
special case. Even if there were, this would just be a spurious wake. This
might have caught some cases where the count has wrapped around, but it
wouldn't reliably do that, (and even if it did, why would you want to force a
sleep in that case?) and we don't support that many concurrent waiters
anyway. Getting rid of it allows us to use one more bit, making us more
robust to wraparound.

Signed-off-by: Malte Skarupke <malteskarupke@fastmail.fm>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-01-17 14:56:58 -05:00
advisories Document CVE-2024-33599, CVE-2024-33600, CVE-2024-33601, CVE-2024-33602 2024-05-06 15:12:31 -04:00
argp Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
assert assert: Remove the use of %n from __assert_fail_base (BZ #32456) 2025-01-02 10:19:42 -03:00
benchtests benchtests: Add dummy in put files cospi, cospif, sinpi, sinpif, tanpi, tanpif 2025-01-16 19:59:58 +01:00
bits AArch64: Add vector tanpi routines 2025-01-03 21:39:56 +00:00
catgets Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ChangeLog.old Add ChangeLog file 2024-07-21 18:33:37 +02:00
conform conform: Do not use __SIG_ATOMIC_TYPE__ 2025-01-03 09:53:53 -03:00
csu Consolidate TLS block allocation for static binaries with ld.so 2025-01-16 20:02:42 +01:00
ctype Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
debug Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dirent Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dlfcn Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
elf Consolidate TLS block allocation for static binaries with ld.so 2025-01-16 20:02:42 +01:00
gmon gmon: Disable tst-profile-static with clang 2025-01-13 10:17:42 -03:00
gnulib Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
hesiod Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
htl htl: Fix making pthread_join check timeout value 2025-01-07 01:02:20 +01:00
hurd hurd: Add CLOCK_MONOTONIC support to lll 2025-01-12 22:47:00 +01:00
iconv Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
iconvdata Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
include include/string.h: Also redirect calls if not inlined in libpthread 2025-01-07 20:53:18 +01:00
inet inet: Add common IPv6 packet header macros 2025-01-13 10:54:38 -03:00
intl Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
io Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libio Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
locale Update copyright dates not handled by scripts/update-copyrights 2025-01-01 11:22:09 -08:00
localedata Update copyright dates not handled by scripts/update-copyrights 2025-01-01 11:22:09 -08:00
login Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
mach mach: Add missing error messages 2025-01-14 22:41:03 +01:00
malloc malloc: obscure calloc use in tst-calloc 2025-01-10 03:57:06 +00:00
manual Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math AArch64: Add vector tanpi routines 2025-01-03 21:39:56 +00:00
mathvec Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
misc mlock, mlock2, munlock: Use __attr_access_none macro 2025-01-02 17:58:06 +00:00
nis Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
nptl nptl: Use all of g1_start and g_signals 2025-01-17 14:56:58 -05:00
nptl_db Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
nscd Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
nss Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
po Regenerate libc.pot 2025-01-04 11:05:03 +01:00
posix Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
resolv Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
resource Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
rt Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
scripts Don't update copyright notices in Linux licenses 2025-01-01 12:16:24 -08:00
setjmp Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
signal Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
socket socket/tst-cmsghdr: Fix alignment of cmsghdr 2025-01-12 15:57:26 +01:00
soft-fp Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stdio-common stdio-common: Suppress Clang warnings on scanf13.c with fortify enable 2025-01-13 10:53:08 -03:00
stdlib Linux: Fixes for getrandom fork handling 2025-01-16 19:58:09 +01:00
string Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sunrpc Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
support tst-xdirent: Fix allocating dirent for readdir_r call 2025-01-07 01:56:41 +01:00
sysdeps nptl: Remove g_refs from condition variables 2025-01-17 14:56:58 -05:00
sysvipc Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
termios Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
time Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
timezone Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wcsmbs Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wctype Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
.b4-config Add .b4-config file 2024-10-21 14:26:42 +01:00
.clang-format Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
.gitattributes Assume __NR_openat is always defined 2016-03-23 23:35:08 +01:00
.gitignore Add *.pyc to .gitignore 2015-05-18 15:26:26 +05:30
abi-tags Remove the bulk of the NaCl port. 2017-05-20 08:09:10 -04:00
aclocal.m4 Use -finput-charset=ascii only if supported 2024-12-22 12:42:02 +08:00
config.h.in mach: Add CLOCK_MONOTONIC case in clock_gettime() 2025-01-12 22:47:00 +01:00
config.make.in manual: add syscalls 2024-07-09 11:54:29 +02:00
configure configure: Clear libc_cv_cc_wimplicit_fallthrough if not supported 2025-01-10 09:07:05 +08:00
configure.ac configure: Clear libc_cv_cc_wimplicit_fallthrough if not supported 2025-01-10 09:07:05 +08:00
CONTRIBUTED-BY crypt: Remove libcrypt support 2023-10-30 13:03:59 -03:00
COPYING
COPYING.LIB
extra-lib.mk Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
gen-locales.mk locale: Handle loading a missing locale twice (Bug 14247) 2024-04-22 16:03:00 -04:00
INSTALL INSTALL, NEWS: Document requirement of gawk with MPFR support 2024-12-30 17:03:36 +01:00
libc-abis riscv: support GNU indirect function 2021-01-10 21:25:13 -05:00
libof-iterator.mk Rename cppflags-iterator.mk to libof-iterator.mk, remove extra-modules.mk. 2017-05-09 07:06:29 -04:00
LICENSES added url of CORE-MATH project 2024-12-18 17:24:43 -03:00
MAINTAINERS Add MAINTAINERS 2017-05-11 13:38:30 -04:00
Makeconfig Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
Makefile Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
Makefile.help Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
Makefile.in Rename have-mtls-descriptor to have-test-mtls-descriptor 2025-01-04 04:51:21 +08:00
Makerules Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
NEWS Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
o-iterator.mk
README Remove ia64-linux-gnu 2024-01-08 17:09:36 -03:00
Rules Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
SECURITY.md Adapt the security policy for the security page 2023-12-05 09:15:10 -05:00
SHARED-FILES math: Use tanhf from CORE-MATH 2024-12-18 17:24:43 -03:00
shlib-versions crypt: Remove libcrypt support 2023-10-30 13:03:59 -03:00
test-skeleton.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
version.h Increase version number to 2.40.9000 2024-07-21 18:49:35 +02:00

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu and x86_64-gnu.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arc*-*-linux-gnu
	arm-*-linux-gnueabi
	csky-*-linux-gnuabiv2
	hppa-*-linux-gnu
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	loongarch64-*-linux-gnu Hardware floating point, LE only.
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	or1k-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	riscv32-*-linux-gnu
	riscv64-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see https://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at https://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see https://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.