From owner-freebsd-doc@FreeBSD.ORG Mon Aug 11 21:29:10 2014 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC179929; Mon, 11 Aug 2014 21:29:10 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83DF02715; Mon, 11 Aug 2014 21:29:10 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 63983B924; Mon, 11 Aug 2014 17:29:09 -0400 (EDT) From: John Baldwin To: freebsd-doc@freebsd.org Subject: Re: man pthread Date: Mon, 11 Aug 2014 14:09:39 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201408111409.39434.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 11 Aug 2014 17:29:09 -0400 (EDT) Cc: Gavin Atkinson X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 21:29:10 -0000 On Sunday, July 27, 2014 7:00:13 pm Gavin Atkinson wrote: > On Mon, 21 Jul 2014, Malcolm Douglas wrote: > > Sorry, not sure if this is the right way to handle this, but I saw a > > doc error. > > > > The pthread_cond_wait and pthread_cond_timedwait descriptions are > > incorrect in man pthread. > > > > The description is: > > Wait for a condition and lock the specified mutex. > > > > It should be: > > Wait for a condition and unlock the specified mutex. > > The current description is actually correct, but not clear. How about: > > pthread_cond_timedwait() > Unlock the specified mutex, wait no longer than the specified time for > a condition, and then relock the mutex. > > pthread_cond_wait() > Unlock the specified mutex, wait for a condition, and relock the mutex. > > Would that be better? I believe it is, yes. -- John Baldwin