Re: any fairness in NTPL pthread mutexes?

Lee Revell
2005-10-31T18:07:35Z

On Mon, 2005-10-31 at 11:57 -0600, Christopher Friesen wrote:
> I'm using NPTL.
>
> If I have a pthread mutex currently owned by a task, and two other tasks
> try to lock it, when the mutex is unlocked, are there any rules about
> the order in which the waiting tasks get the mutex (ie priority, FIFO,
> etc.)?

I believe it's currently FIFO in violation of POSIX which specifies
priority based wakeup. AIUI one of the main goals of the realtime &
robust mutexes work is to fix this.

Lee