glibc/include
Adhemerval Zanella fa872e1b62 Clean pthread functions namespaces for C11 threads
This patch adds internal definition (through {libc_}hidden_{proto,def}) and
also change some strong to weak alias for symbols that might be used by C11
threads implementations.

The patchset should not change libc/libpthread functional, although object
changes are expected (since now internal symbols are used instead) and final
exported symbols through GLIBC_PRIVATE is also expanded (to cover libpthread
usage of __mmap{64}, __munmap, __mprotect).

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,
tile{pro,gx}-linux-gnu, and x86_64-linux-gnu).

	* include/sched.h (__sched_get_priority_max): Add libc hidden proto.
	(__sched_get_prioriry_min): Likewise.
	* include/sys/mman.h (__mmap): Likewise.
	(__mmap64): Likewise.
	(__munmap): Likewise.
	(__mprotect): Likewise.
	* include/termios.h (__tcsetattr): Likewise.
	* include/time.h (__nanosleep): Use hidden_proto instead of
	libc_hidden_proto.
	* posix/nanosleep.c (__nanosleep): Likewise.
	* misc/Versions (libc): Export __mmap, __munmap, __mprotect,
	__sched_get_priority_min, and __sched_get_priority_max under
	GLIBC_PRIVATE.
	* nptl/allocatestack.c (__free_stacks): Use internal definition for
	libc symbols.
	(change_stack_perm): Likewise.
	(allocate_stack): Likewise.
	* sysdeps/posix/gethostname.c: Likewise.
	* nptl/tpp.c (__init_sched_fifo_prio): Likewise.
	* sysdeps/unix/sysv/linux/i386/smp.h (is_smp_system): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/ioctl.c (__ioctl): Likewise.
	* nptl/pthreadP.h (__pthread_mutex_timedlock): Add definition.
	(__pthread_key_delete): Likewise.
	(__pthread_detach): Likewise.
	(__pthread_cancel): Likewise.
	(__pthread_mutex_trylock): Likewise.
	(__pthread_mutexattr_init): Likewise.
	(__pthread_mutexattr_settype): Likewise.
	* nptl/pthread_cancel.c (pthread_cancel): Change to internal name and
	create alias for exported one.
	* nptl/pthread_join.c (pthread_join): Likewise.
	* nptl/pthread_detach.c (pthread_detach): Likewise.
	* nptl/pthread_key_delete.c (pthread_key_delete): Likewise.
	* nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
	* nptl/pthread_create.c: Change static requirements for pthread
	symbols.
	* nptl/pthread_equal.c (__pthread_equal): Change strong alias to weak
	for internal definition.
	* nptl/pthread_exit.c (__pthread_exit): Likewise.
	* nptl/pthread_getspecific.c (__pthread_getspecific): Likewise.
	* nptl/pthread_key_create.c (__pthread_key_create): Likewise.
	* nptl/pthread_mutex_destroy.c (__pthread_mutex_destroy): Likewise.
	* nptl/pthread_mutex_init.c (__pthread_mutex_init): Likewise.
	* nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise.
	* nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
	* nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock): Likewise.
	* nptl/pthread_mutexattr_init.c (__pthread_mutexattr_init): Likwise.
	* nptl/pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
	Likewise.
	* nptl/pthread_self.c (__pthread_self): Likewise.
	* nptl/pthread_setspecific.c (__pthread_setspecific): Likewise.
	* sysdeps/unix/sysv/linux/tcsetattr.c (tcsetattr): Likewise.
	* misc/mmap.c (__mmap): Add internal symbol definition.
	* misc/mmap.c (__mmap64): Likewise.
	* sysdeps/unix/sysv/linux/mmap.c (__mmap): Likewise.
	* sysdeps/unix/sysv/linux/mmap64.c (__mmap): Likewise.
	(__mmap64): Likewise.
	* sysdeps/unix/sysv/linux/i386/Versions (libc) [GLIBC_PRIVATE):
	Add __uname.
2017-06-23 17:38:17 -03:00
..
arpa nss_dns: Replace local declarations with declarations from a header file 2017-04-04 20:56:23 +02:00
bits Rename xlocale.h to bits/types/__locale_t.h. 2017-06-20 20:28:11 -04:00
gnu Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
net Fix resolver if_* namespace (bug 17717). 2014-12-16 18:18:49 +00:00
netinet Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
programs Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
protocols (abmon): Remove spaces. 1998-11-12 18:03:43 +00:00
rpc sunrpc: Always obtain AF_INET addresses from NSS [BZ #20964] 2016-12-27 16:44:15 +01:00
rpcsvc Deprecate libnsl by default (only shared library will be 2017-03-21 15:14:27 +01:00
sys Clean pthread functions namespaces for C11 threads 2017-06-23 17:38:17 -03:00
aio.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
aliases.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
alloc_buffer.h Implement allocation buffers for internal use 2017-06-21 22:43:57 +02:00
alloca.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
argp.h Update. 2000-12-28 15:08:51 +00:00
argz.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
assert.h Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
atomic.h Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
byteswap.h Update. 1998-04-10 10:52:25 +00:00
caller.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
complex.h float128: Add private _Float128 declarations for libm. 2017-05-15 10:23:28 -03:00
cpio.h Add more headers to include/ for conform tests. 2014-12-11 21:41:30 +00:00
crypt.h Add include/crypt.h. 2016-10-28 22:40:16 -04:00
ctype.h Rename bits/libc-tsd.h to libc-tsd.h (bug 14912). 2015-09-03 20:33:46 +00:00
des.h Update. 1998-03-24 10:39:42 +00:00
dirent.h Mark internal dirent functions hidden 2015-10-15 14:15:41 -07:00
dlfcn.h Mark _dl_catch_error hidden 2015-10-15 14:13:50 -07:00
elf.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
endian.h Update. 2001-03-30 05:34:59 +00:00
envz.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
err.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
errno.h Remove __need macros from errno.h (__need_Emath, __need_error_t). 2017-06-14 08:14:34 -04:00
error.h Update. 1997-06-21 02:59:26 +00:00
execinfo.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
fcntl.h Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
features.h Add support for testing __STDC_WANT_IEC_60559_TYPES_EXT__ 2017-05-09 11:40:28 -03:00
fenv.h Mark fegetround pure (bug 16296). 2015-09-15 20:36:50 +00:00
float.h Include libc-header-start.h in include/float.h 2017-06-23 10:30:04 -03:00
fmtmsg.h Add more headers to include/ for conform tests. 2014-12-11 21:41:30 +00:00
fnmatch.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
fpu_control.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
ftw.h Update. 1997-06-21 02:59:26 +00:00
gconv.h Update. 1997-11-18 02:50:07 +00:00
getopt.h getopt: remove USE_NONOPTION_FLAGS 2017-04-07 07:45:53 -04:00
getopt_int.h Update. 2004-03-09 10:36:53 +00:00
glob.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
gmp.h float128: Add strtof128, wcstof128, and related functions. 2017-06-12 14:48:53 -03:00
gnu-versions.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
grp-merge.h NSS: Implement group merging support. 2016-04-29 22:18:21 -04:00
grp.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
gshadow.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
iconv.h Update. 1999-08-21 00:38:15 +00:00
ifaddrs.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
ifunc-impl-list.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
inline-hashtab.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
langinfo.h Add first fixes for conformtest for POSIX2008 2012-02-26 21:32:56 -05:00
libc-diag.h Split DIAG_* macros to new header libc-diag.h. 2017-02-25 09:59:46 -05:00
libc-internal.h Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
libc-pointer-arith.h Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
libc-symbols.h Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
libgen.h Update. 1997-06-21 02:59:26 +00:00
libintl.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
libio.h Remove _IO_MTSAFE_IO from public headers. 2017-05-11 19:14:11 -04:00
limits.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
link.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
list.h Remove __need_list_t and __need_res_state. 2017-05-20 19:01:46 -04:00
list_t.h Remove __need_list_t and __need_res_state. 2017-05-20 19:01:46 -04:00
locale.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
malloc.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
math.h float128: Add private _Float128 declarations for libm. 2017-05-15 10:23:28 -03:00
mcheck.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
memory.h Update. 1997-06-21 02:59:26 +00:00
mntent.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
monetary.h Use locale_t, not __locale_t, throughout glibc 2017-06-20 20:30:06 -04:00
mqueue.h Fix mq_receive, mq_send mq_timed* namespace (bug 18545). 2015-06-17 20:19:04 +00:00
netdb.h Fix network headers stdint.h namespace (bug 21455). 2017-05-04 20:36:42 +00:00
netgroup.h Update. 1997-06-21 02:59:26 +00:00
nl_types.h Update. 1997-12-22 20:53:38 +00:00
nss.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
nsswitch.h Update. 1997-06-21 02:59:26 +00:00
obstack.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
poll.h Update. 2000-08-21 16:02:48 +00:00
printf.h Rename xlocale.h to bits/types/__locale_t.h. 2017-06-20 20:28:11 -04:00
pthread.h Fix mq_notify pthread_barrier_* namespace (bug 18544). 2015-06-17 20:16:56 +00:00
pty.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
pwd.h Harden putpwent, putgrent, putspent, putspent against injection [BZ #18724] 2015-10-02 11:34:13 +02:00
regex.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
resolv.h resolv: Make __res_vinit hidden 2017-06-19 14:24:23 +02:00
rounding-mode.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sched.h Clean pthread functions namespaces for C11 threads 2017-06-23 17:38:17 -03:00
scratch_buffer.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
search.h Fix sem_* tdelete, tfind, tsearch, twalk namespace (bug 18536). 2015-06-17 20:11:58 +00:00
set-hooks.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setjmp.h Mark internal setjmp functions hidden 2015-10-15 14:22:25 -07:00
sgtty.h Update. 1997-06-21 02:59:26 +00:00
shadow.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
shlib-compat.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
signal.h Fix struct sigaltstack namespace (bug 21517). 2017-06-05 10:17:46 +00:00
spawn.h Update. 2000-10-01 19:15:29 +00:00
stab.h Update. 1997-06-21 02:59:26 +00:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stap-probe.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stdc-predef.h Bug 21533: Update to Unicode 10.0.0 2017-06-22 17:02:55 +02:00
stdio.h Remove __need macros from stdio.h and wchar.h. 2017-06-08 13:58:17 -04:00
stdio_ext.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
stdlib.h Use locale_t, not __locale_t, throughout glibc 2017-06-20 20:30:06 -04:00
string.h Remove bits/string.h. 2017-06-20 08:21:24 -04:00
strings.h Update. 1997-06-21 02:59:26 +00:00
stropts.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
stubs-prologue.h * sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional 2002-10-11 10:52:20 +00:00
syscall.h Update. 1997-06-21 02:59:26 +00:00
sysexits.h Update. 1997-06-21 02:59:26 +00:00
syslog.h Update. 1997-06-21 02:59:26 +00:00
tar.h Update. 1997-06-21 02:59:26 +00:00
termios.h Clean pthread functions namespaces for C11 threads 2017-06-23 17:38:17 -03:00
tgmath.h Update. 1998-09-06 23:45:24 +00:00
time.h Clean pthread functions namespaces for C11 threads 2017-06-23 17:38:17 -03:00
ttyent.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
uchar.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
ucontext.h Update. 1999-10-12 18:17:41 +00:00
ulimit.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
unistd.h Suppress internal declarations for most of the testsuite. 2017-05-11 19:27:59 -04:00
utime.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00
utmp.h Installed header hygiene (BZ#20366): Test of installed headers. 2016-09-23 08:43:56 -04:00
values.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
wchar.h Use locale_t, not __locale_t, throughout glibc 2017-06-20 20:30:06 -04:00
wctype.h Remove __need macros from stdio.h and wchar.h. 2017-06-08 13:58:17 -04:00
wordexp.h First steps to get conformtest fully working 2012-02-25 23:18:39 -05:00