From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262282AbTKABc6 (ORCPT ); Fri, 31 Oct 2003 20:32:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262349AbTKABc6 (ORCPT ); Fri, 31 Oct 2003 20:32:58 -0500 Received: from mail.broadpark.no ([217.13.4.2]:16845 "EHLO mail.broadpark.no") by vger.kernel.org with ESMTP id S262282AbTKABc5 (ORCPT ); Fri, 31 Oct 2003 20:32:57 -0500 To: sankar , linux-kernel@vger.kernel.org Subject: Re: pthread mutex question References: Message-ID: From: Arve Knudsen Content-Type: text/plain; charset=US-ASCII; format=flowed MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Date: Sat, 01 Nov 2003 02:31:54 +0100 In-Reply-To: User-Agent: Opera7.21/Linux M2 build 480 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Its C++, but you could have a look at the boost::thread::timed_mutex (www.boost.org) implementation, which makes use of pthread_cond_timedwait. Regards Arve Knudsen On Fri, 31 Oct 2003 16:43:14 -0800, sankar wrote: > Hi, > I am looking for an idea as to how to implement timed mutex using pthread > libraries on linux. > Basically I want to associate a timeout value with the wait function i,e > pthread_mutex_lock() which returns once the timeout expires instaed of > waiting for ever. > Pls help > > thx.. > > Sankarshana M