newlib-cygwin/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 mv .cvsignore to .gitignore 2015-03-09 21:40:26 +01:00
Makefile.in Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
README winsup/doc: Update ancient README about building documentation 2015-06-23 12:07:47 +01:00
Wishlist . 2013-05-23 19:03:19 +00:00
bodysnatcher.pl Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
configure Update autoconf for doc/lsaauth/utils 2016-04-01 14:04:41 +02:00
configure.ac Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
cygserver.xml Remove references to older Cygwin releases from documentation 2016-03-18 22:52:04 +01:00
cygwin-api.xml winsup/doc: Create info pages from cygwin documentation 2015-06-23 12:05:29 +01:00
cygwin-ug-net.xml winsup/doc: Create info pages from cygwin documentation 2015-06-23 12:05:29 +01:00
cygwinenv.xml Remove CYGWIN=detect_bloda option 2016-06-25 00:43:01 +02:00
dll.xml Modernized user guide, API reference, and FAQ generation. Overall 2013-05-01 23:30:25 +00:00
effectively.xml Remove XP and Server 2003 from documentation 2016-06-24 23:21:10 +02:00
faq-api.xml Remove Mingw.org from FAQ, or replace with Mingw-w64. 2016-03-21 21:09:23 +01:00
faq-copyright.xml * Throughout, replace http with https as far as cygwin.com and 2015-02-03 13:48:43 +00:00
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 * Throughout, replace http with https as far as cygwin.com and 2015-02-03 13:48:43 +00:00
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 Modernized user guide, API reference, and FAQ generation. Overall 2013-05-01 23:30:25 +00:00
fhandler-tut.txt * fhandler-tut.txt: Update description to cygwin 1.5.13 2005-04-20 04:26:34 +00:00
filemodes.xml Modernized user guide, API reference, and FAQ generation. Overall 2013-05-01 23:30:25 +00:00
fo.xsl winsup/doc: Generate ANSI rather than K&R style function prototypes 2015-06-18 11:32:00 +01:00
gcc.xml * gcc.xml (gcc-64): Fix example. 2013-07-25 09:09:14 +00:00
gdb.xml Modernized user guide, API reference, and FAQ generation. Overall 2013-05-01 23:30:25 +00:00
gprof.xml Documentation covering profiling Cygwin programs. 2016-03-11 11:08:01 +01:00
highlights.xml Remove CYGWIN=detect_bloda option 2016-06-25 00:43:01 +02:00
html.xsl winsup/doc: Generate ANSI rather than K&R style function prototypes 2015-06-18 11:32:00 +01:00
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 winsup/doc: Convert cygwin-api function documentation to refentry elements 2015-06-18 11:32:03 +01:00
man.xsl winsup/doc: Add man.xsl customization stylesheet 2015-06-18 11:32:08 +01:00
misc-funcs.xml winsup/doc: Convert cygwin-api function documentation to refentry elements 2015-06-18 11:32:03 +01:00
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 Remove mention of installing everything 2015-06-01 17:13:32 +01:00
ov-ex-win.xml Remove mention of installing everything 2015-06-01 17:13:32 +01:00
overview.xml Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option 2016-06-23 10:09:17 +02:00
path.xml Allow cygwin_conv_path(3) and cygpath(1) to emit /proc/cygdrive prefixed path 2015-12-06 17:25:48 +01:00
pathnames.xml Remove references to older Cygwin releases from documentation 2016-03-18 22:52:04 +01:00
posix.xml Add pthread_getname_np and pthread_setname_np 2016-08-23 15:07:42 +01:00
programming.xml Documentation covering profiling Cygwin programs. 2016-03-11 11:08:01 +01:00
setup-env.xml Remove references to older Cygwin releases from documentation 2016-03-18 22:52:04 +01:00
setup-files.xml * setup-files.xml (setup-files): Drop hint to set HOME in Windows 2015-02-16 10:23:01 +00:00
setup-locale.xml Remove XP and Server 2003 from documentation 2016-06-24 23:21:10 +02:00
setup-maxmem.xml Remove references to older Cygwin releases from documentation 2016-03-18 22:52:04 +01:00
setup-net.xml Git is Git, not GIT 2016-05-24 12:09:10 +02:00
specialnames.xml Remove XP and Server 2003 from documentation 2016-06-24 23:21:10 +02:00
textbinary.xml Remove references to older Cygwin releases from documentation 2016-03-18 22:52:04 +01:00
ug-info.xml Modernized user guide, API reference, and FAQ generation. Overall 2013-05-01 23:30:25 +00:00
using.xml * Makefile.in: Throughout use parenthesis instead of braces where 2014-08-14 19:44:29 +00:00
utils.xml Add -i/--input option to locale(1) 2016-08-17 10:58:04 +02:00
windres.xml Modernized user guide, API reference, and FAQ generation. Overall 2013-05-01 23:30:25 +00:00
xidepend winsup/doc: Make it easier to extend xidepend to more targets 2015-06-16 10:28:49 +01:00

README

ADDITIONAL BUILD REQUIREMENTS FOR DOCUMENTATION

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