Commit Graph

2 Commits

Author SHA1 Message Date
Joseph Myers 04277e02d7 Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2019-01-01 00:11:28 +00:00
Adhemerval Zanella 918311a3a3 nptl: Add C11 threads cnd_* functions
This patch adds the cnd_* definitions from C11 threads (ISO/IEC 9899:2011),
more specifically cnd_broadcast, cnd_destroy, cnd_init, cnd_signal,
cnd_timedwait, cnd_wait, and required types.

Mostly of the definitions are composed based on POSIX conterparts, and
cnd_t is also based on internal pthreads fields, but with distinct internal
layout to avoid possible issues with code interchange (such as trying to pass
POSIX structure on C11 functions and to avoid inclusion of pthread.h).  The
idea is to make it possible to share POSIX internal implementation for mostly
of the code making adjust where only required.

Checked with a build for all major ABI (aarch64-linux-gnu, alpha-linux-gnu,
arm-linux-gnueabi, i386-linux-gnu, ia64-linux-gnu, m68k-linux-gnu,
microblaze-linux-gnu [1], mips{64}-linux-gnu, nios2-linux-gnu,
powerpc{64le}-linux-gnu, s390{x}-linux-gnu, sparc{64}-linux-gnu,
and x86_64-linux-gnu).

Also ran a full check on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu,
arm-linux-gnueabhf, and powerpc64le-linux-gnu.

	[BZ #14092]
	* conform/data/threads.h-data (cnd_t): New type.
	(cnd_init): New function.
	(cnd_signal): Likewise.
	(cnd_broadcast): Likewise.
	(cnd_wait): Likewise.
	(cnd_timedwait): Likewise.
	(cnd_destroy): Likewise.
	* nptl/Makefile (libpthread-routines): Add cnd_broadcast,
	cnd_destroy, cnd_init, cnd_signal, cnd_timedwait, and cnd_wait
	object.
	* nptl/Versions (libpthread) [GLIBC_2.28]: Likewise.
	* nptl/cnd_broadcast.c: New file.
	* nptl/cnd_destroy.c: Likewise.
	* nptl/cnd_init.c: Likewise.
	* nptl/cnd_signal.c: Likewise.
	* nptl/cnd_timedwait.c: Likewise.
	* nptl/cnd_wait.c: Likewise.
	* sysdeps/nptl/threads.h (cnd_t): New type.
	(cnd_init): New prototype.
	(cnd_signa): Likewise.
	(cnd_broadcast): Likewise.
	(cnd_wait): Likewise.
	(cnd_timedwait): Likewise.
	(cnd_destroy): Likewise.
2018-07-24 14:07:07 -03:00