From owner-cvs-src@FreeBSD.ORG Mon Nov 1 14:31:11 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C480A16A4CE; Mon, 1 Nov 2004 14:31:11 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56DA643D1F; Mon, 1 Nov 2004 14:31:11 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) iA1EVA3Y016807; Mon, 1 Nov 2004 09:31:10 -0500 (EST) Date: Mon, 1 Nov 2004 09:31:10 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Brian Feldman In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libpthread/thread thr_mutex.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2004 14:31:11 -0000 On Sun, 31 Oct 2004, Daniel Eischen wrote: > On Sun, 31 Oct 2004, Brian Feldman wrote: > > > green 2004-10-31 05:03:50 UTC > > > > FreeBSD src repository > > > > Modified files: > > lib/libpthread/thread thr_mutex.c > > Log: > > Make pthread_mutex_trylock(3) return EBUSY on failure, as all software > > packages expect and seems to be most correct according to the slightly- > > ambiguous standards. > > > > MFC after: 1 month > > Corroborated by: POSIX > > Reviewed by: silence on threads@ > > I never saw this, and there has been a couple of long threads about > it. The current behavior was deemed correct especially since default > mutexes are error check mutexes. The rationale is that it provides a way > for a thread to tell if it owns the mutex if EDEADLK is returned. > > Please back out and sorry for not seeing a posting on -threads. I retract the backout request. I have response from Dave Butenhof over at the Austin Group mailing list, and EBUSY should be returned even for error check mutexes. He acknolwedged the spec was not clear and thought they had cleaned it up in that regard. So this is the correct fix :-) -- Dan Eischen