From owner-svn-src-head@freebsd.org Sat Jun 25 17:03:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B164AB80C2A; Sat, 25 Jun 2016 17:03:09 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.netplex.net", Issuer "RapidSSL SHA256 CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DB5316F2; Sat, 25 Jun 2016 17:03:08 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.15.1/8.15.1/NETPLEX) with ESMTP id u5PH317c033643; Sat, 25 Jun 2016 13:03:01 -0400 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.4.3 (mail.netplex.net [204.213.176.9]); Sat, 25 Jun 2016 13:03:01 -0400 (EDT) Date: Sat, 25 Jun 2016 13:03:01 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net Reply-To: Daniel Eischen To: Konstantin Belousov cc: Ivan Klymenko , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r302194 - head/lib/libthr/thread In-Reply-To: <20160625161615.GD38613@kib.kiev.ua> Message-ID: References: <201606251130.u5PBUeGC001988@repo.freebsd.org> <20160625164403.70684b3b@nonamehost.local> <20160625135508.GV38613@kib.kiev.ua> <20160625170406.77c79b2e@nonamehost.local> <20160625140529.GW38613@kib.kiev.ua> <20160625171800.50a43746@nonamehost.local> <20160625142915.GX38613@kib.kiev.ua> <20160625175503.7c57d42b@nonamehost.local> <20160625152006.GA38613@kib.kiev.ua> <20160625190346.19a1ef0d@nonamehost.local> <20160625161615.GD38613@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jun 2016 17:03:09 -0000 On Sat, 25 Jun 2016, Konstantin Belousov wrote: > On Sat, Jun 25, 2016 at 07:03:46PM +0300, Ivan Klymenko wrote: >> On Sat, 25 Jun 2016 18:20:06 +0300 >> Konstantin Belousov wrote: >>> diff --git a/lib/libthr/thread/thr_mutex.c >>> b/lib/libthr/thread/thr_mutex.c index 2ad05ca..1ae75fb 100644 >>> --- a/lib/libthr/thread/thr_mutex.c >>> +++ b/lib/libthr/thread/thr_mutex.c >>> @@ -850,10 +871,10 @@ mutex_self_trylock(struct pthread_mutex *m) >>> >>> switch (PMUTEX_TYPE(m->m_flags)) { >>> case PTHREAD_MUTEX_ERRORCHECK: >>> - case PTHREAD_MUTEX_ADAPTIVE_NP: >>> ret = EDEADLK; >>> break; >>> >>> + case PTHREAD_MUTEX_ADAPTIVE_NP: >>> case PTHREAD_MUTEX_NORMAL: >>> ret = EBUSY; >>> break; >> >> Strange, it's not helped http://pastebin.com/jbzP0JW2 > > Are you sure that the new libthr was installed ? Compile and run the > following test, please, and show me the results. On the patched libthr, > the program must not output anything and exits with error code 0. Sorry for not noticing and coming in late, but I think the original change is wrong. I don't see in the 2013 POSIX spec or Solaris 11 man page (haven't checked Linux yet) where pthread_mutex_trylock() returns EDEADLK under any circumstance. http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_trylock.html http://docs.oracle.com/cd/E23824_01/html/821-1465/pthread-mutex-trylock-3c.html#scrolltoc -- DE