From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,dee25f6fd173ccc0,start X-Google-Attributes: gidfee84,public From: Terence Cross Subject: recursive mutex locks in posix threads Date: 1996/04/25 Message-ID: <317FB0E9.76AB@iona.com>#1/1 X-Deja-AN: 151398988 content-type: text/plain; charset=us-ascii organization: Iona Technologies mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 2.0 (WinNT; I) Hi, In the OSF1 (Digital Unix) posix threads package there is a recursive mutex. This is not supposed to be used as the lock for a condition variable because if recursion is > 1 then the coniditional wait will fail to unlock the mutex. So fast mutexes are suggested. However, for recursive mutexes, why did the conditional not simply unlock the recursive mutex many times until it was free. Store that number on the stack. On return pop the number and lock it that many times. rgs, /Terence Cross.