pthread_mutex_trylock behaviour

Alex Waugh alex at
Sun Jan 23 05:48:12 PST 2005

In message <ab1f7e314d.peter at>
          Peter Naulls <peter at> wrote:

> Can you confirm that pthread_mutex_trylock should return EBUSY not
> EDEADLK when the current thread already contains a lock on the mutex?
> If so, I'll submit a patch.

Yes, it should return EBUSY. Similarly for pthread_rwlock_tryrdlock and
pthread_rwlock_trywrlock (But not the non try variants).


Alex Waugh                                           alex at

PHP, Roots, Subversion, WebJames and more from

More information about the gcc mailing list