Boost logo

Boost :

From: Lie-Quan Lee (llee1_at_[hidden])
Date: 2001-04-03 16:44:17


At Tue, 03 Apr 2001 21:08:31 -0000,
William Kempf wrote:
> > "undefined" could be an alias of "guaranteed dead lock" depending
> > on the implementation in pthreads.
>
> No, undefined does _not_ mean "guaranteed dead lock" by the POSIX
> definition (so what specific implementations do is irrelevant). The

Here is what IEEE-1003.1-200x says:
If the mutex type is PTHREAD_MUTEX_DEFAULT, attempting to recursively
lock the mutex results in undefined behavior. Attempting to unlock
the mutex if it was not locked by the calling thread results in
undefined behavior. Attempting to unlock the mutex if it is not locked
results in undefined behavior.

According to that, the pthread implementor is legal to make
PTHREAD_MUTEX_DEFAULT type mutex to be an alias of
PTHREAD_MUTEX_NORMAL type mutex which is "guaranteed dead lock" on
recursive locking.

I guess that my question in that message is: if does and should the
"undefined" defined in Boost.Threads have different meaning than
IEEE-1003.1-200x said?

--
Rich

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk