#
09c817ba |
| 03-Jul-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- MFC
|
#
0046fd5d |
| 14-Jun-2009 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Unlock process lock when return error from getrobustlist call.
Tested by: Alexander Best <alexbestms at math uni-muenster de> Approved by: kib (mentor) MFC after: 3 days
|
#
2e370a5c |
| 26-May-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
Merge from HEAD
|
#
ca8c3e7b |
| 07-May-2009 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Add KTR(9) tracing for futex emulation.
Approved by: kib (mentor) MFC after: 1 month
|
#
e7153b25 |
| 07-May-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
Merge from HEAD
|
#
d789bfd5 |
| 02-May-2009 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Move extern variable definitions to the header file.
Approved by: kib (mentor) MFC after: 1 month
|
#
79262bf1 |
| 01-May-2009 |
Dmitry Chagin <dchagin@FreeBSD.org> |
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 prote
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) MFC after: 1 month
show more ...
|
Revision tags: release/7.2.0_cvs, release/7.2.0 |
|
#
b1121623 |
| 19-Apr-2009 |
Dmitry Chagin <dchagin@FreeBSD.org> |
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
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) MFC after: 1 month
show more ...
|
#
9c797940 |
| 13-Apr-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- Merge from HEAD
|
#
731aded8 |
| 16-Mar-2009 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Sort include files in the alphabetical order.
Approved by: kib (mentor) MFC after: 2 weeks
|
#
b41a7787 |
| 15-Mar-2009 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Ignore FUTEX_FD op, as it is done by linux.
Approved by: kib (mentor) MFC after: 2 weeks
|
#
3b8cbbde |
| 15-Mar-2009 |
Dmitry Chagin <dchagin@FreeBSD.org> |
Include linux_futex.h before linux_emul.h
Approved by: kib (mentor) MFC after: 6 days
|
Revision tags: release/6.4.0_cvs, release/6.4.0 |
|
#
62162dfc |
| 16-Nov-2008 |
Konstantin Belousov <kib@FreeBSD.org> |
In the robust futexes list head, futex_offset shall be signed, and glibc actually supplies negative offsets. Change l_ulong to l_long.
Submitted by: dchagin
|
#
175c6c31 |
| 14-Oct-2008 |
Konstantin Belousov <kib@FreeBSD.org> |
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.
Submitted by: dchagin
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.
Submitted by: dchagin MFC after: 1 week
show more ...
|
#
4732e446 |
| 13-May-2008 |
Roman Divacky <rdivacky@FreeBSD.org> |
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 userspa
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.
Reviewed by: kib (mentor) MFC after: 1 month
show more ...
|
#
6af82123 |
| 20-Mar-2008 |
Roman Divacky <rdivacky@FreeBSD.org> |
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 Cle
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 MFC after: 1 week
show more ...
|
#
a0b0d286 |
| 02-Mar-2008 |
Konstantin Belousov <kib@FreeBSD.org> |
Return ENOSYS instead of 0 for the unknown futex operations.
Submitted by: rdivacky Reported and tested by: Gary Stanley <gary velocity-servers net>
|
Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0 |
|
#
1c182de9 |
| 23-May-2007 |
Konstantin Belousov <kib@FreeBSD.org> |
Move futex support code from <arch>/support.s into linux compat directory. Implement all futex atomic operations in assembler to not depend on the fuword() that does not allow to distinguish between
Move futex support code from <arch>/support.s into linux compat directory. 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 <swhetzel gmail com>, Milos Vyletel <mvyletel mzm cz> Sponsored by: Google SoC 2007
show more ...
|
#
a328699b |
| 30-Mar-2007 |
Jung-uk Kim <jkim@FreeBSD.org> |
MFP4: Linux futex support for amd64.
Initial patch was submitted by kib and additional work was done by Divacky Roman.
Tested by: emulation
|
#
8cf5ee2e |
| 25-Feb-2007 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFp4 (110541): Sync with rev 1.7 in NetBSD.
Obtained from: NetBSD
|
#
f9dac961 |
| 25-Feb-2007 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFp4 (110523, parts which apply cleanly): semi-automatic style(9)
The futex stuff already differs a lot (only a small part does not differ) from NetBSD, so we are already way off and can't apply ch
MFp4 (110523, parts which apply cleanly): semi-automatic style(9)
The futex stuff already differs a lot (only a small part does not differ) from NetBSD, so we are already way off and can't apply changes from NetBSD automatically. As we need to merge everything by hand already, we can even make the files comply to our world order.
show more ...
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
#
bb59e63f |
| 09-Sep-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Change futex lock from mutex to sx. Make futex_get atomic (protected by the futex lock).
Sponsored by: Google SoC 2006 Submitted by: rdivacky Suggested by: jhb
|
#
c19ddeda |
| 09-Sep-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
- don't wake every sleeper just the first one [1] - remove debuging printf [2]
Submitted by: intron <mag@intron.ac> [1], rdivacky [2]
|
#
84ed9f91 |
| 26-Aug-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Correct the number of retries in a futex_wake() call.
Sponsored by: Google SoC 2006 Submitted by: rdivacky
|
#
b273d5aa |
| 19-Aug-2006 |
Suleiman Souhlal <ssouhlal@FreeBSD.org> |
ifdef DEBUG a printf
Submitted by: rdivacky
|