>>>>> On Sun, 21 Feb 2010 17:48:48 +0100, Reimar Doeffinger said: > > while (cs->lock_count && cs->id != pthread_self()) Perhaps it should be using pthread_equal? pthread_equal != == :-) http://www.opengroup.org/onlinepubs/009695399/functions/pthread_equal.html#tag_03_527_08 __Martin