pthread_mutex_trylock behaviour

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


In message <ab1f7e314d.peter at chocky.org>
          Peter Naulls <peter at chocky.org> 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

-- 
Alex Waugh                                           alex at alexwaugh.com

PHP, Roots, Subversion, WebJames and more from http://www.alexwaugh.com/



More information about the gcc mailing list