newlib/winsup/cygwin/release
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
..
1.7.10
1.7.11
1.7.12
1.7.13
1.7.14
1.7.15
1.7.16
1.7.17
1.7.18
1.7.19 *** empty log message *** 2013-06-05 07:21:56 +00:00
1.7.20 *** empty log message *** 2013-06-06 15:31:15 +00:00
1.7.21 *** empty log message *** 2013-07-15 10:04:03 +00:00
1.7.22 * regex/regcomp.c (wgetnext): Add a kludge to be more glibc compatible. 2013-07-21 19:28:45 +00:00
1.7.23 *** empty log message *** 2013-07-31 10:32:46 +00:00
1.7.24 * include/sys/cygwin.h (struct per_process): Add posix_memalign. Reduce 2013-08-14 11:44:23 +00:00
1.7.25 *** empty log message *** 2013-08-30 21:42:40 +00:00
1.7.26 * syscalls.cc (try_to_bin): Take additional parameter to get file open 2013-11-27 14:27:34 +00:00
1.7.27 *** empty log message *** 2013-12-08 13:38:27 +00:00
1.7.28 *** empty log message *** 2014-01-27 21:25:39 +00:00
1.7.29 release/1.7.29 2014-04-07 11:41:49 +00:00
1.7.30 *** empty log message *** 2014-05-23 07:15:30 +00:00
1.7.31 *** empty log message *** 2014-07-18 12:28:00 +00:00
1.7.32 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 33. 2014-08-13 17:38:47 +00:00
1.7.33 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 34. 2014-11-13 13:10:26 +00:00
1.7.34 * common.din (wcstold): Export. 2015-02-04 11:03:36 +00:00
1.7.35 * msg.cc: Throughout, drop raising SIGSYS if cygserver is not running. 2015-03-03 17:09:30 +00:00
2.0.0 Document previous unlink patch 2015-04-23 22:04:59 +02:00
2.0.1 Bump minor DLL version to 1 2015-04-30 17:53:15 +02:00
2.0.3 Add Cygwin 2.0.3 release file 2015-06-03 13:38:19 +02:00
2.0.4 Evaluate /proc/$PID/{root,cwd,cmdline} for native processes 2015-06-08 21:48:13 +02:00
2.1.0 tzset: Check timezone and country case-insensitive 2015-07-08 10:25:49 +02:00
2.2.0 Cygwin: Fix x86_64 memcpy/memset for n > 2GB 2015-07-29 22:09:34 +02:00
2.2.1 Cygwin: Return port number from getservent in network byte order 2015-08-18 13:12:07 +02:00
2.3.0 Avoid deadlock in flock(2) 2015-11-05 18:31:36 +01:00
2.3.1 flock: Fix hang in object collision case 2015-11-12 13:14:08 +01:00
2.4.0 Return unique inode numbers when calling stat/fstat on pipes and IP sockets 2016-01-11 12:35:41 +01:00
2.4.1 Add 2.4.1 release message file 2016-01-23 22:33:31 +01:00
2.5.0 Add latest changes to release message 2016-04-05 10:35:05 +02:00
2.5.1 Add release message for commit 9409c53 2016-04-20 12:34:07 +02:00
2.5.2 Add release message for commit 2c83227 2016-06-21 13:43:53 +02:00
2.6.0 Add pthread_getname_np and pthread_setname_np 2016-08-23 15:07:42 +01:00