This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] [BZ 14417] Document condvar synchronization


On Wed, Sep 26, 2012 at 06:05:20PM +0200, Torvald Riegel wrote:
> On Fri, 2012-09-21 at 12:21 -0600, Jeff Law wrote:
> > On 09/21/2012 12:03 PM, Jakub Jelinek wrote:
> > > On Fri, Sep 21, 2012 at 02:34:46PM +0200, Torvald Riegel wrote:
> > >>      Add explanation of condvar synchronization.
> > >
> > > I believe documentation for how condvars work should be in
> > > nptl/DESIGN-condvar.txt (which exists, but is slightly out of date).
> 
> Putting it in DESIGN-condvar.txt is fine with me if everyone prefers
> that.  However, I think it's better to put it closer to the source; that
> way, it's less easy to forget updating it.

The thing is that we don't have just one source for the condvar code though,
but 4 different versions (C code, x86_64, i486 and sh assembly).
So if you document it just in one spot, it is not documented in the other 3
anyway, referencing DESIGN-condvar.txt from all those 4 could make it
better.  But it needs to cope also with broadcasts and timedwait (and
cancellation) - note wait can be considered just as an optimized version of
timedwait that assumes infinite timeout.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]