Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Aug 2014 14:09:39 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-doc@freebsd.org
Cc:        Gavin Atkinson <gavin@freebsd.org>
Subject:   Re: man pthread
Message-ID:  <201408111409.39434.jhb@freebsd.org>
In-Reply-To: <alpine.BSF.2.11.1407272352060.13507@ury.york.ac.uk>
References:  <CAAfPS01qzjg2LSxmbmzMFZmKYgbARO20nxOOH9LkrQG4iHvbiw@mail.gmail.com> <alpine.BSF.2.11.1407272352060.13507@ury.york.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408111409.39434.jhb>