Subject: Re: Condition variables
To: Eduardo Horvath <eeh@turbolinux.com>
From: Darren Reed <darrenr@reed.wattle.id.au>
List: tech-kern
Date: 06/07/2000 02:12:05
In some email I received from Eduardo Horvath, sie wrote:
[...]
> 3) What does this gain us over adding an interlock to tsleep()?  I know
> what we lose: now every structure that a process might want to consider
> sleeping on will need at least one `condvar_t'.  Each of these
> `condvar_t's needs to be explicitly created and destroyed, which can
> add significantly to code complexity.

This should be no more than an extra `local' variable in the appropriate
file, along with the appropriate calls in _init(), _attach(), _detach(),
etc, functions.  Maybe an extra member in structures.

> I suppose this is more of an implementation question.  The `cond_*'
> interface is conceptually cleaner from a naming perspective (although I
> prefer to use `cv_*' since that's less typing)

And potentially name-space compatible with Solaris which is nice :)

Darren