From owner-cvs-all@FreeBSD.ORG Mon Feb 4 17:11:49 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39F8116A417; Mon, 4 Feb 2008 17:11:49 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id E0FB513C45A; Mon, 4 Feb 2008 17:11:48 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 0709A208F; Mon, 4 Feb 2008 18:11:40 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id EBEA3208C; Mon, 4 Feb 2008 18:11:39 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id D3FD0844A6; Mon, 4 Feb 2008 18:11:39 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Daniel Eischen References: <200802032238.m13McAbf065324@repoman.freebsd.org> <86d4rdgehd.fsf@ds4.des.no> <868x20elw0.fsf@ds4.des.no> Date: Mon, 04 Feb 2008 18:11:39 +0100 In-Reply-To: (Daniel Eischen's message of "Mon\, 4 Feb 2008 11\:31\:09 -0500 \(EST\)") Message-ID: <86ejbsd4tw.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, threads@freebsd.org Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 17:11:49 -0000 Daniel Eischen writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Daniel Eischen writes: > > > If you want to know if the current thread has it locked, it should be > > > called pthread_mutex_isowned_np(). > > I don't see why one would be more correct than the other... > Because it is more obvious that _isowned() is for the current thread > than _islocked(). As you can tell by my previous (incorrect) > assumption. > > There is prior art for this outside of FreeBSD. Solaris has > mutex_owned() as part of their kernel mutex API. I would suggest > using pthread_mutex_owned_np(). Hmm, even FreeBSD has mtx_owned() :-) OK, so the next question is whether this reqires a repo-copy (or a repo-move), or if I can just cvs rm + cvs add (both the implementation and the regression test) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no