<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/lib/libthr/thread, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/'/>
<updated>2020-11-30T17:00:36Z</updated>
<entry>
<title>Ensure that threading library is initialized in pthread_mutex_init().</title>
<updated>2020-11-30T17:00:36Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-11-30T17:00:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=ec5fed758cbe1552c4716f2ac615d09a68905bca'/>
<id>urn:sha1:ec5fed758cbe1552c4716f2ac615d09a68905bca</id>
<content type='text'>
We need at least thr_malloc ready.  The situation is possible e.g. in case
of libthr being listed in DT_NEEDED before some of its consumers.

Reported and tested by:	lev
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
</content>
</entry>
<entry>
<title>libc: Add pthread_attr_get_np(3) stub, reporting ESRCH.</title>
<updated>2020-11-28T12:19:20Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-11-28T12:19:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=412ef5da8a75067e5a31fe626b776451e244fb43'/>
<id>urn:sha1:412ef5da8a75067e5a31fe626b776451e244fb43</id>
<content type='text'>
This seems to be required by recent clang asan.
I do not see other way than put the symbol under FBSD_1.0 version.

PR:	251112
Reported by:	Andrew Stitcher &lt;astitcher@apache.org&gt;
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D27389
</content>
</entry>
<entry>
<title>Style.</title>
<updated>2020-11-26T20:23:17Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-11-26T20:23:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=20b8e1a25cfa39df4f953d2b1cec1ecb9549976f'/>
<id>urn:sha1:20b8e1a25cfa39df4f953d2b1cec1ecb9549976f</id>
<content type='text'>
Sponsored by:	The FreeBSD Foundation
MFC after: 3 days
</content>
</entry>
<entry>
<title>Add pthread_getname_np() and pthread_setname_np() aliases for</title>
<updated>2020-06-10T22:13:24Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-06-10T22:13:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=2ef84b7da9a6c3e23b4a135e6e863581f16d46e1'/>
<id>urn:sha1:2ef84b7da9a6c3e23b4a135e6e863581f16d46e1</id>
<content type='text'>
pthread_get_name_np() and pthread_set_name_np().

This re-applies r361770 after compatibility fixes.

Reviewed by:	antoine, jkim, markj
Tested by:	antoine (exp-run)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D25117
</content>
</entry>
<entry>
<title>Revert r361770 "Add pthread_getname_np() and pthread_setname_np() aliases" for now.</title>
<updated>2020-06-04T09:06:03Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-06-04T09:06:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=064c283d65d1e23dc93d16150292e5aa256c3726'/>
<id>urn:sha1:064c283d65d1e23dc93d16150292e5aa256c3726</id>
<content type='text'>
It is not compatible enough with Linux.

Requested by:	antoine, jkim
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Add pthread_getname_np() and pthread_setname_np() aliases</title>
<updated>2020-06-03T20:54:36Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-06-03T20:54:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=9bed49fea4a668db2c331a59458a89ae8808984e'/>
<id>urn:sha1:9bed49fea4a668db2c331a59458a89ae8808984e</id>
<content type='text'>
for pthread_get_name_np() and pthread_set_name_np(), to be
compatible with Linux.

PR:	238404
Proposed and reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D25117
</content>
</entry>
<entry>
<title>Add pthread_peekjoin_np(3).</title>
<updated>2020-02-15T23:25:39Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-02-15T23:25:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=132fb3dc99c39717cf379908f3ce11de2e54844c'/>
<id>urn:sha1:132fb3dc99c39717cf379908f3ce11de2e54844c</id>
<content type='text'>
The function allows to peek at the thread exit status and even see
return value, without joining (and thus finally destroying) the target
thread.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation (kib)
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D23676
</content>
</entry>
<entry>
<title>Return success, instead of ESRCH, from pthread_cancel(3) applied to the</title>
<updated>2020-02-13T23:22:12Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-02-13T23:22:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=751fae1effde32b441dd232a0bf3340a419f2d17'/>
<id>urn:sha1:751fae1effde32b441dd232a0bf3340a419f2d17</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Use sigfastblock(2) for masking signals in libthr.</title>
<updated>2020-02-09T12:27:22Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-02-09T12:27:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=fc908e500165fec250bea86310e7ae0eedc23af8'/>
<id>urn:sha1:fc908e500165fec250bea86310e7ae0eedc23af8</id>
<content type='text'>
Ensure proper handshake to transfer sigfastblock(2) blocking word
ownership from rtld to libthr.

Unfortunately sigfastblock(2) is not enough to stop intercepting
signals in libthr, because critical sections must ensure more than
just signal blocking.

Tested by:	pho
Disscussed with:	cem, emaste, jilles
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D12773
</content>
</entry>
<entry>
<title>Fix destruction of the robust mutexes.</title>
<updated>2019-09-23T13:24:31Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2019-09-23T13:24:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=f9bf9282c9803ebc6774f3de6a566d84aaa8f192'/>
<id>urn:sha1:f9bf9282c9803ebc6774f3de6a566d84aaa8f192</id>
<content type='text'>
If robust mutex' owner terminated, causing kernel-assisted state
recovery, and then pthread_mutex_destroy() is executed as the next
action, assert is triggered about mutex still being on the list.
Ignore the mutex linkage in pthread_mutex_destroy() for shared robust
mutexes with dead owner, same as for enqueue_mutex().

Reported by:	avg
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
</content>
</entry>
</feed>
