<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/include/pthread.h, branch release/13.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F13.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F13.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-08-23T17:43:21Z</updated>
<entry>
<title>Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-23T17:43:21Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=17da660ad5b3b9cd90e164dd4dbb9beaa7203054'/>
<id>urn:sha1:17da660ad5b3b9cd90e164dd4dbb9beaa7203054</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b3e7694832e8)
</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/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>POSIX compliance improvements in the pthread(3) functions.</title>
<updated>2018-08-18T01:05:38Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2018-08-18T01:05:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b6413b6db8756c1ecae5e575e6516f811966046f'/>
<id>urn:sha1:b6413b6db8756c1ecae5e575e6516f811966046f</id>
<content type='text'>
This basically adds makes use of the C99 restrict keyword, and also
adds some 'const's to four threading functions: pthread_mutexattr_gettype(),
pthread_mutexattr_getprioceiling(), pthread_mutexattr_getprotocol(), and
pthread_mutex_getprioceiling. The changes are in accordance to POSIX/SUSv4-2018.

Hinted by:	DragonFlyBSD

Relnotes:	yes
MFC after:	1 month
Differential Revision:	D16722
</content>
</entry>
<entry>
<title>pthread.h: minor indentation cleanups.</title>
<updated>2018-04-04T15:16:04Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2018-04-04T15:16:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=65436b2e1207a98a1c752c14f8c059238c0eafda'/>
<id>urn:sha1:65436b2e1207a98a1c752c14f8c059238c0eafda</id>
<content type='text'>
No functional change.

X-MFC with:	r331969
</content>
</entry>
<entry>
<title>pthread.h: drop nullability attributes.</title>
<updated>2018-04-04T02:00:10Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2018-04-04T02:00:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7a07ca9b3c7443fc6d0ea73a3cc7bbb331c72eac'/>
<id>urn:sha1:7a07ca9b3c7443fc6d0ea73a3cc7bbb331c72eac</id>
<content type='text'>
These have been found to be practically useless. We were actually
following the Android bionic library and had some interest in replicating
the same warnings and behaviour but Android has since removed them.

We are still keeping some uses of nullability attributes in other headers,
somewhat in line with Apple's libc.

MFC after:	1 week
Hinted by: bionic (git 3f66e74b903905e763e104396aff52a81718cfde)
</content>
</entry>
<entry>
<title>include: General further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-25T17:09:43Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-25T17:09:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e58eb3c437974277957187cfed4b9aa0c1a1e253'/>
<id>urn:sha1:e58eb3c437974277957187cfed4b9aa0c1a1e253</id>
<content type='text'>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</content>
</entry>
<entry>
<title>Small inclusion guard comment fix.</title>
<updated>2017-02-16T20:28:30Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-02-16T20:28:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4eecef906265d2f49eab6be92ced762b05cf3753'/>
<id>urn:sha1:4eecef906265d2f49eab6be92ced762b05cf3753</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make use of clang nullability attributes.</title>
<updated>2017-01-28T20:54:43Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-01-28T20:54:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=649702c5a34798b68a51305271a9099f83f4e34f'/>
<id>urn:sha1:649702c5a34798b68a51305271a9099f83f4e34f</id>
<content type='text'>
Replace uses of the GCC __nonnull__ attribute with the clang nullability
qualifiers. The replacement should be transparent for clang developers as
the new qualifiers will produce the same warnings and will be useful for
static checkers but will not cause aggressive optimizations.

GCC will not produce such warnings and developers will have to use
upgraded GCC ports built with the system headers from r312538.

Hinted by:	Apple's Libc-1158.20.4, Bionic libc
MFC after:	11.1 Release

Differential Revision:	https://reviews.freebsd.org/D9004
</content>
</entry>
<entry>
<title>Remove some uses of the GCC __nonnull() attribute.</title>
<updated>2017-01-01T17:16:47Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-01-01T17:16:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f1b298ad46305d58fa4bd8a02db4ec12d3e3726e'/>
<id>urn:sha1:f1b298ad46305d58fa4bd8a02db4ec12d3e3726e</id>
<content type='text'>
While the checks are considered useful, the attribute does dangerous
optimizations, removing NULL checks where they can be needed. Remove the
uses of this attribute introduced in r281130: the changes were inspired on
Google's bionic where this attribute is not used anymore.

The __nonnull() attribute will be deprecrated from our headers and
replaced with the Clang _Nonnull qualifier in the future.

MFC after:	3 days
</content>
</entry>
<entry>
<title>Add implementation of robust mutexes, hopefully close enough to the</title>
<updated>2016-05-17T09:56:22Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2016-05-17T09:56:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2a339d9e3dc129f0b0b79c2cb8d2bb0386fb0f5f'/>
<id>urn:sha1:2a339d9e3dc129f0b0b79c2cb8d2bb0386fb0f5f</id>
<content type='text'>
intention of the POSIX IEEE Std 1003.1TM-2008/Cor 1-2013.

A robust mutex is guaranteed to be cleared by the system upon either
thread or process owner termination while the mutex is held.  The next
mutex locker is then notified about inconsistent mutex state and can
execute (or abandon) corrective actions.

The patch mostly consists of small changes here and there, adding
neccessary checks for the inconsistent and abandoned conditions into
existing paths.  Additionally, the thread exit handler was extended to
iterate over the userspace-maintained list of owned robust mutexes,
unlocking and marking as terminated each of them.

The list of owned robust mutexes cannot be maintained atomically
synchronous with the mutex lock state (it is possible in kernel, but
is too expensive).  Instead, for the duration of lock or unlock
operation, the current mutex is remembered in a special slot that is
also checked by the kernel at thread termination.

Kernel must be aware about the per-thread location of the heads of
robust mutex lists and the current active mutex slot.  When a thread
touches a robust mutex for the first time, a new umtx op syscall is
issued which informs about location of lists heads.

The umtx sleep queues for PP and PI mutexes are split between
non-robust and robust.

Somewhat unrelated changes in the patch:
1. Style.
2. The fix for proper tdfind() call use in umtxq_sleep_pi() for shared
   pi mutexes.
3. Removal of the userspace struct pthread_mutex m_owner field.
4. The sysctl kern.ipc.umtx_vnode_persistent is added, which controls
   the lifetime of the shared mutex associated with a vnode' page.

Reviewed by:	jilles (previous version, supposedly the objection was fixed)
Discussed with:	brooks, Martin Simmons &lt;martin@lispworks.com&gt; (some aspects)
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
</feed>
