acadia-newlib/winsup/doc
Jon Turney fdb7df230d Add pthread_getname_np and pthread_setname_np
This patch adds pthread_getname_np and pthread_setname_np.

These were added to glibc in 2.12[1] and are also present in some form on
NetBSD and several UNIXes.

The code is based on NetBSD's implementation with changes to better match
Linux behaviour.

Implementation quirks:

* pthread_setname_np with a NULL pointer segfaults (as linux)

* pthread_setname_np returns ERANGE for names longer than 16 characters (as
linux)

* pthread_getname_np with a NULL pointer returns EFAULT (as linux)

* pthread_getname_np with a buffer length of less than 16 returns ERANGE (as
linux)

* pthread_getname_np truncates the thread name to fit the buffer length.
This guarantees success even when the default thread name is longer than 16
characters, but means there is no way to discover the actual length of the
thread name. (Linux always truncates the thread name to 16 characters)

* Changing program_invocation_short_name changes the default thread name (on
linux, it has no effect on the default thread name)

I'll leave it up to you to decide if any of these matter.

This is implemented via class pthread_attr to make it easier to add
pthread_attr_[gs]etname_np (present in NetBSD and some UNIXes) should it
ever be added to Linux (or we decide we want it anyway).

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS
2016-08-23 15:07:42 +01:00
..
.gitignore
Makefile.in Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
README
Wishlist
bodysnatcher.pl Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
configure
configure.ac Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
cygserver.xml
cygwin-api.xml
cygwin-ug-net.xml
cygwinenv.xml Remove CYGWIN=detect_bloda option 2016-06-25 00:43:01 +02:00
dll.xml
effectively.xml Remove XP and Server 2003 from documentation 2016-06-24 23:21:10 +02:00
faq-api.xml
faq-copyright.xml
faq-programming.xml Restore mingw64-x86_64-gcc-core in FAQ listing required packages 2016-06-29 15:08:33 +01:00
faq-resources.xml
faq-setup.xml Remove XP and Server 2003 from documentation 2016-06-24 23:21:10 +02:00
faq-using.xml Remove XP and Server 2003 from documentation 2016-06-24 23:21:10 +02:00
faq-what.xml Remove XP and Server 2003 from documentation 2016-06-24 23:21:10 +02:00
faq.xml
fhandler-tut.txt
filemodes.xml
fo.xsl
gcc.xml
gdb.xml
gprof.xml
highlights.xml Remove CYGWIN=detect_bloda option 2016-06-25 00:43:01 +02:00
html.xsl
intro.xml Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
legal.xml Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
logon-funcs.xml
man.xsl
misc-funcs.xml
new-features.xml Add pthread_getname_np and pthread_setname_np 2016-08-23 15:07:42 +01:00
ntsec.xml Remove XP and Server 2003 from documentation 2016-06-24 23:21:10 +02:00
ov-ex-unix.xml
ov-ex-win.xml
overview.xml Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
path.xml
pathnames.xml
posix.xml Add pthread_getname_np and pthread_setname_np 2016-08-23 15:07:42 +01:00
programming.xml
setup-env.xml
setup-files.xml
setup-locale.xml Remove XP and Server 2003 from documentation 2016-06-24 23:21:10 +02:00
setup-maxmem.xml
setup-net.xml
specialnames.xml Remove XP and Server 2003 from documentation 2016-06-24 23:21:10 +02:00
textbinary.xml
ug-info.xml
using.xml
utils.xml Add -i/--input option to locale(1) 2016-08-17 10:58:04 +02:00
windres.xml
xidepend

README

ADDITIONAL BUILD REQUIREMENTS FOR DOCUMENTATION

dblatex
docbook-xml45
docbook-xsl
docbook2x-texi
gzip
texinfo
xmlto