Lee! Forget my other post ...
On Wed, 2006-01-25 at 22:27 -0500, Paul Coccoli wrote:
In "Programming with POSIX Threads" by David
R. Butenhof,
pthread_mutex_unlock is said to do this:
"Unlock a mutex. The mutex becomes unowned. If any threads are
waiting for the mutex, one is awakened..."
Yes, but what is the completion of that sentence? Could it be:
... and placed in the ready state.
Or perhaps:
... in priority order to aquire the lock.
Seems to suggest a reschedule. Butenhof worked on the
POSIX
standards, so I would consider him an authority.
There seems to be consensus among Solaris/HPUX/DEC/Linux implementations
that the thread is only awake long enough to aquire the lock. And then a
rescheduling *may* take place.
The posix documentation is a bit vague though.
--