RE: Thread starvation with mutex
"Perez-Gonzalez, Inaky" <[email protected]> Fri, 6 Feb 2004 16:23:34 -0800
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Message-ID | <[email protected]> |
> From: Ulrich Drepper [mailto:[email protected]] > Perez-Gonzalez, Inaky wrote: > > > Where do I say anybody claims anything? I am talking POSIX here. > > And POSIX does not require anything like this, it's purely optional. So > your comments are wrong. To me it reads like it is not optional, unless there is an inconsistency, they have changed it in the patches, corregidendums or whatever the name is. Where does it say is optional? [from pthread_mutex_[un,try]lock()] in 1003.1-2001] 33935 The pthread_mutex_unlock( ) function shall release the mutex object referenced by mutex. The 33936 manner in which a mutex is released is dependent upon the mutex's type attribute. If there are 33937 threads blocked on the mutex object referenced by mutex when pthread_mutex_unlock( ) is called, 33938 resulting in the mutex becoming available, the scheduling policy shall determine which thread 33939 shall acquire the mutex. Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own (and my fault)