<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/compat/linux/linux_futex.c, branch releng/7.3</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F7.3</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F7.3'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2009-06-17T16:56:21Z</updated>
<entry>
<title>MFC r194203:</title>
<updated>2009-06-17T16:56:21Z</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2009-06-17T16:56:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1182664b29e4946d8ba8dbe260ff73120d614d0d'/>
<id>urn:sha1:1182664b29e4946d8ba8dbe260ff73120d614d0d</id>
<content type='text'>
Unlock process lock when return error from getrobustlist call.

Approved by:	kib (mentor)
</content>
</entry>
<entry>
<title>MFC r191887:</title>
<updated>2009-06-06T10:59:36Z</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2009-06-06T10:59:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a14d2dcf8305d45c7a99c73f26b644988d0b63ff'/>
<id>urn:sha1:a14d2dcf8305d45c7a99c73f26b644988d0b63ff</id>
<content type='text'>
Add KTR(9) tracing for futex emulation.

Approved by:	kib (mentor)
</content>
</entry>
<entry>
<title>MFC r191741:</title>
<updated>2009-06-01T04:44:43Z</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2009-06-01T04:44:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bff285de4a7ddda078a0772175e9b2936b58f60f'/>
<id>urn:sha1:bff285de4a7ddda078a0772175e9b2936b58f60f</id>
<content type='text'>
Move extern variable definitions to the header file.

Approved by:	kib (mentor)
</content>
</entry>
<entry>
<title>MFC r191719:</title>
<updated>2009-05-31T06:58:35Z</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2009-05-31T06:58:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=55697af2738202647e6800d03aef8ca841cffe4e'/>
<id>urn:sha1:55697af2738202647e6800d03aef8ca841cffe4e</id>
<content type='text'>
Reimplement futexes.
Old implemention used Giant to protect the kernel data structures,
but at the same time called malloc(M_WAITOK), that could cause the
calling thread to sleep and lost Giant protection. User-visible
result was the missed wakeup.

New implementation uses one sx lock per futex. The sx protects
the futex structures and allows to sleep while copyin or copyout
are performed.

Unlike linux, we return EINVAL when FUTEX_CMP_REQUEUE operation
is requested and either caller specified futexes are equial or
second futex already exists. This is acceptable since the situation
can only occur from the application error, and glibc falls back to
old FUTEX_WAKE operation when FUTEX_CMP_REQUEUE returns an error.

Approved by:	kib (mentor)
</content>
</entry>
<entry>
<title>Merge r191269 from HEAD to stable/7:</title>
<updated>2009-05-25T14:36:21Z</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2009-05-25T14:36:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ec54525f084ea191cf988d76b88650e8a1b3fb8a'/>
<id>urn:sha1:ec54525f084ea191cf988d76b88650e8a1b3fb8a</id>
<content type='text'>
Remove support for FUTEX_REQUEUE operation.
Glibc does not use this operation since 2.3.3 version (Jun 2004),
as it is racy and replaced by FUTEX_CMP_REQUEUE operation.
Glibc versions prior to 2.3.3 fall back to FUTEX_WAKE when
FUTEX_REQUEUE returned EINVAL.

Any application directly using FUTEX_REQUEUE without return
value checking are definitely broken.

Limit quantity of messages per process about unsupported
operation.

Approved by:	kib(mentor)
</content>
</entry>
<entry>
<title>Merge from HEAD to stable/7:</title>
<updated>2009-05-05T15:19:45Z</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2009-05-05T15:19:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=91effcb17519aca1bd7195aadc485610b956b814'/>
<id>urn:sha1:91effcb17519aca1bd7195aadc485610b956b814</id>
<content type='text'>
r189861:
Include linux_futex.h before linux_emul.h

r189862:
Ignore FUTEX_FD op, as it is done by linux.

r189867:
Sort include files in the alphabetical order.

Approved by:	kib (mentor)
</content>
</entry>
<entry>
<title>Merge from HEAD to stable/7:</title>
<updated>2009-05-05T14:53:58Z</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2009-05-05T14:53:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7a57d7ffe816b0fe0347ab9d72820bfb56d04992'/>
<id>urn:sha1:7a57d7ffe816b0fe0347ab9d72820bfb56d04992</id>
<content type='text'>
r178976 (rdivacky):
Implement robust futexes. Most of the code is modelled after
what Linux does. This is because robust futexes are mostly
userspace thing which we cannot alter. Two syscalls maintain
pointer to userspace list and when process exits a routine
walks this list waking up processes sleeping on futexes
from that list.

r183871:
Make robust futexes work on linux32/amd64. Use PTRIN to read
user-mode pointers. Change types used in the structures definitions to
properly-sized architecture-specific types.

r185002:
In the robust futexes list head, futex_offset shall be signed,
and glibc actually supplies negative offsets. Change l_ulong to l_long.

Approved by:	kib (mentor)
</content>
</entry>
<entry>
<title>MFC rev. 1.12 of sys/compat/linux/linux_futex.c</title>
<updated>2008-03-28T10:13:20Z</updated>
<author>
<name>Roman Divacky</name>
<email>rdivacky@FreeBSD.org</email>
</author>
<published>2008-03-28T10:13:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2aad8c90ba93330425eb2ac00399582990a46be0'/>
<id>urn:sha1:2aad8c90ba93330425eb2ac00399582990a46be0</id>
<content type='text'>
MFC rev. 1.3 of sys/compat/linux/linux_futex.h:

	o	Add stub support for some new futex operations,
		so the annoying message is not printed.

	o	Don't warn about FUTEX_FD not being implemented
		and return ENOSYS instead of 0 (eg. success).

	o	Clear FUTEX_PRIVATE_FLAG as we actually implement
		only private futexes so there is no reason to
		return ENOSYS when app asks for a private futex.
		We don't reject shared futexes because they worked
		just fine with our implementation so far.

Approved by:	kib (mentor)
Tested by:	bsam
</content>
</entry>
<entry>
<title>MFC rev. 1.11:</title>
<updated>2008-03-09T13:59:19Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2008-03-09T13:59:19Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0a2609448fd688530764b1074bbd444c07444210'/>
<id>urn:sha1:0a2609448fd688530764b1074bbd444c07444210</id>
<content type='text'>
Return ENOSYS instead of 0 for the unknown futex operations.
</content>
</entry>
<entry>
<title>Move futex support code from &lt;arch&gt;/support.s into linux compat directory.</title>
<updated>2007-05-23T08:33:06Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2007-05-23T08:33:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1c182de9a99afd152c548bda64ab626a1b9f5a3e'/>
<id>urn:sha1:1c182de9a99afd152c548bda64ab626a1b9f5a3e</id>
<content type='text'>
Implement all futex atomic operations in assembler to not depend on the
fuword() that does not allow to distinguish between -1 and failure return.
Correctly return 0 from atomic operations on success.

In collaboration with:	rdivacky
Tested by:	Scot Hetzel &lt;swhetzel gmail com&gt;, Milos Vyletel &lt;mvyletel mzm cz&gt;
Sponsored by:	Google SoC 2007
</content>
</entry>
</feed>
