<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/include/pthread.h, branch release/11.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2018-09-17T02:51:08Z</updated>
<entry>
<title>MFC r337992, r338125:</title>
<updated>2018-09-17T02:51:08Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2018-09-17T02:51:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=90d5476ca19bc82f8c76c38e8ed5141e70a40b82'/>
<id>urn:sha1:90d5476ca19bc82f8c76c38e8ed5141e70a40b82</id>
<content type='text'>
POSIX compliance improvements in the pthread(3) functions.

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
</content>
</entry>
<entry>
<title>MFC r331969, r332035:</title>
<updated>2018-04-08T21:56:35Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2018-04-08T21:56:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=87e852abac63010ed562c41ae1b08e86effe413e'/>
<id>urn:sha1:87e852abac63010ed562c41ae1b08e86effe413e</id>
<content type='text'>
pthread.h: drop nullability attributes.

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.

Hinted by: bionic (git 3f66e74b903905e763e104396aff52a81718cfde)
</content>
</entry>
<entry>
<title>Revert r330897:</title>
<updated>2018-03-29T02:50:57Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-29T02:50:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=4ab2e064d7950be84256d671a7ae93f87cc6aa36'/>
<id>urn:sha1:4ab2e064d7950be84256d671a7ae93f87cc6aa36</id>
<content type='text'>
This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)
</content>
</entry>
<entry>
<title>MFC r313818:</title>
<updated>2018-03-19T07:00:15Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-19T07:00:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=0a1c65e828d96c6a5bf90cb8fd471faab0c28cc8'/>
<id>urn:sha1:0a1c65e828d96c6a5bf90cb8fd471faab0c28cc8</id>
<content type='text'>
Small inclusion guard comment fix.
</content>
</entry>
<entry>
<title>Partial merge of the SPDX changes</title>
<updated>2018-03-14T03:19:51Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2018-03-14T03:19:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=be5d0b9566b13fdf8cabebb63334cbec12bfc409'/>
<id>urn:sha1:be5d0b9566b13fdf8cabebb63334cbec12bfc409</id>
<content type='text'>
These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from:	pfg
</content>
</entry>
<entry>
<title>MFC r312934:</title>
<updated>2017-03-14T20:14:57Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-03-14T20:14:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=0685b1047a24502ae7061889c18f282bce657dca'/>
<id>urn:sha1:0685b1047a24502ae7061889c18f282bce657dca</id>
<content type='text'>
Make use of clang nullability attributes in C headers.

Replace uses of the GCC __nonnull__ attribute with the clang nullability
qualifiers. These are starting to get use in clang's static analyzer.

Replacement should be transparent for developers using clang. GCC ports
from older FreeBSD versions may need updating if the compiler was built
before r312860 (Jan-27-2017).

Hinted by:	Apple's Libc-1158.20.4, Bionic libc

Relnotes:	yes
</content>
</entry>
<entry>
<title>MFC r311012</title>
<updated>2017-01-04T02:51:39Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-01-04T02:51:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=9cd9b37e4d7c46dea5488d7eb7868250877ba813'/>
<id>urn:sha1:9cd9b37e4d7c46dea5488d7eb7868250877ba813</id>
<content type='text'>
Remove some uses of the GCC __nonnull() attribute.

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.

In general, the __nonnull() attribute has fulfilled its roll and will be
replaced with the Clang _Nonnull qualifier in the future.
</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-test2/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>
<entry>
<title>Implement process-shared locks support for libthr.so.3, without</title>
<updated>2016-02-28T17:52:33Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2016-02-28T17:52:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=1bdbd705993eab79189dff87b69a9cff5c69b17e'/>
<id>urn:sha1:1bdbd705993eab79189dff87b69a9cff5c69b17e</id>
<content type='text'>
breaking the ABI.  Special value is stored in the lock pointer to
indicate shared lock, and offline page in the shared memory is
allocated to store the actual lock.

Reviewed by:	vangyzen (previous version)
Discussed with:	deischen, emaste, jhb, rwatson,
	Martin Simmons &lt;martin@lispworks.com&gt;
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Make use of gcc attributes in some standard include headers.</title>
<updated>2015-04-06T01:39:16Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2015-04-06T01:39:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=153cbcd6579a5c285e7f384c09211b081bb800c4'/>
<id>urn:sha1:153cbcd6579a5c285e7f384c09211b081bb800c4</id>
<content type='text'>
The `nonnull' attribute specifies that some function parameters should be
non-null pointers.  This is very useful as it helps the compiler generate
warnings on suspicious code and can also enable some small optimizations.

Also start using 'alloc_size' attribute in the allocator functions.

This is an initial step to better integrate our libc with the compiler:
these attributes are fully supported by clang and they are also useful
for the static analyzer.

Note that due to some bogus internal procedure in the way gcc ports
are built they may require updating if they were built before r280801.

Relnotes:		yes
Hinted by:		Android's bionic libc
Differential Revision:	https://reviews.freebsd.org/D2107
</content>
</entry>
</feed>
