Messages in this thread | | | From | "David Schwartz" <> | Subject | RE: pthread_mutex_unlock (was Re: sched_yield() makes OpenLDAP slow) | Date | Fri, 27 Jan 2006 11:50:41 -0800 |
| |
> If we just went with "whoever asks first" then clearly one of the > blocked threads asked before the unlocker made its new request. You're > arguing for my point, then.
Huh? I am saying the policy can be anything at all. We could just go with "whoever asks first", but we are not required to. And, in any event, I meant whoever asks for the mutex first, not whoever blocks first. (Note that I didn't say "whoever asked first" which would mean something totally different.)
> Other ambiguities aside, one thing is clear - a decision is triggered by > the unlock. What you seem to be arguing is the equivalent of saying that > the decision is made based on the next lock operation.
The spec says that the decision is triggered by a particular condition that exists at the time of the unlock. That does not mean the decision is made at the time of the unlock.
> The spec doesn't > say that mutex_lock is to behave this way.
We don't agree on what the specification says.
> Why do you suppose that is?
Why do I suppose what? I find the specification perfectly clear and your reading of it incredibly strained for the three reasons I stated.
> Perhaps you should raise this question with the Open Group.
I don't think it's unclear.
DS
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |