freebsd-skq/lib/libthr
kib 6e6ecd2aa1 Return success, instead of ESRCH, from pthread_cancel(3) applied to the
exited but not yet joined thread.

Before, if the thread exited but was not yet joined, we returned
ESRCH.

According to IEEE Std 1003.1™-2017 recommendation in the
description of pthread_cancel(3):
  If an implementation detects use of a thread ID after the end of its
  lifetime, it is recommended that the function should fail and report
  an [ESRCH] error.
So it seems desirable to not return ESRCH until the lifetime of the
thread ID ends.  According to the section 2.9.2 Thread IDs,
  The lifetime of a thread ID ends after the thread terminates if it
  was created with the detachstate attribute set to
  PTHREAD_CREATE_DETACHED or if pthread_detach() or pthread_join()
  has been called for that thread.
In other words, lifetime for thread ID of exited but not yet joined thread
did not ended yet.

Prompted by:	cperciva
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2020-02-13 23:22:12 +00:00
..
arch libthr: Add missing END() directive for umtx_op_err (amd64) 2019-10-23 18:27:30 +00:00
sys spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
tests Use MACHINE_CPUARCH in preference MACHINE for userland. 2017-11-07 09:57:26 +00:00
thread Return success, instead of ESRCH, from pthread_cancel(3) applied to the 2020-02-13 23:22:12 +00:00
libthr.3 Fix markup. 2016-06-04 20:20:14 +00:00
Makefile Fix initial exec TLS mode for dynamically loaded shared objects. 2019-03-29 17:52:57 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
plockstat.d
pthread.map Fix initial exec TLS mode for dynamically loaded shared objects. 2019-03-29 17:52:57 +00:00