2005-10-08 21:47:25

by David Singleton

[permalink] [raw]
Subject: robust futex patch for 2.6.14-rc3-rt13


Ingo,
here's a patch for the robust futex changes that match the
glibc/nptl changes
for robust futexes. The kernel and glibc now both have robustness and
priority inheritance independent.

This patch is based off 2.6.14-rc3-rt13.

The changes remove some duplicate defines from futex.c and glibc and
put all the defines into futex.h. The defines have also been changed
a bit
to make the assembler in glibc simpler.

There is also one fix to futex.c where the first waiter on a futex
waits instead of returning -EAGAIN.

The glibc patches can be found at http://source.mvista.com/~dsingleton


glibc-bull-nptl-robustmutexes.patch
glibc-mvl-nptl-priority-inheritance-rf2.patch

David


Attachments:
f.diff (1.76 kB)

2005-10-08 23:02:20

by David Singleton

[permalink] [raw]
Subject: Re: robust futex patch for 2.6.14-rc3-rt13


On Oct 8, 2005, at 3:52 PM, Jakub Jelinek wrote:

> On Sat, Oct 08, 2005 at 03:22:20PM -0700, david singleton wrote:
>>
>> On Oct 8, 2005, at 3:14 PM, Jakub Jelinek wrote:
>>
>>> On Sat, Oct 08, 2005 at 02:47:23PM -0700, david singleton wrote:
>>>>
>>>> Ingo,
>>>> here's a patch for the robust futex changes that match the
>>>> glibc/nptl changes
>>>> for robust futexes. The kernel and glibc now both have robustness
>>>> and
>>>> priority inheritance independent.
>>>
>>> Are you aware of the futex FUTEX_WAKE_OP addition from over a month
>>> ago?
>>> Futex command 5 is already taken, so you can't use it for the robust
>>> futex commands.
>>
>> Yes. I merged the robust ops a while back to be compatible with
>> WAKE_OP.
>>
>> Currently, 2.6.14-rc3-rt13, the ops are defined thusly:
>>
>> #define FUTEX_WAIT 0
>> #define FUTEX_WAKE 1
>> #define FUTEX_FD 2
>> #define FUTEX_REQUEUE 3
>> #define FUTEX_CMP_REQUEUE 4
>> #define FUTEX_WAKE_OP 5
>> #define FUTEX_WAIT_ROBUST 6
>> #define FUTEX_WAKE_ROBUST 7
>> #define FUTEX_REGISTER 8
>> #define FUTEX_DEREGISTER 9
>> #define FUTEX_RECOVER 10
>
> That's ok.
> I was judging by the glibc patch you posted this Friday:

Sorry, that was against an old tree. The patch today was against
2.6.14-rc3-rt13.

I've done that twice now. I have to back up to the bleeding edge.

David


> +#define FUTEX_WAIT_ROBUST 5
> +#define FUTEX_WAKE_ROBUST 6
> +#define FUTEX_REGISTER 7
> +#define FUTEX_DEREGISTER 8
> +#define FUTEX_RECOVER 9
>
> Jakub

2005-10-11 11:18:20

by Ingo Molnar

[permalink] [raw]
Subject: Re: robust futex patch for 2.6.14-rc3-rt13


* david singleton <[email protected]> wrote:

> Ingo,
> here's a patch for the robust futex changes that match the
> glibc/nptl changes
> for robust futexes. The kernel and glibc now both have robustness and
> priority inheritance independent.
>
> This patch is based off 2.6.14-rc3-rt13.

thanks, applied - this patch is part of -rc4-rt1.

Ingo