Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2001 23:29:47 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        (Alfred Perlstein) <bright@wintelcom.net>, (Randell Jesup) <rjesup@wgate.com>, arch@FreeBSD.org, (Jason Evans) <jasone@canonware.com>
Subject:   Re: HEADS-UP: await/asleep removal imminent
Message-ID:  <XFMail.010117232947.jhb@FreeBSD.org>
In-Reply-To: <200101180330.UAA25782@usr08.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 18-Jan-01 Terry Lambert wrote:
>> Well, it will be unused if we axe all tsleep's in favor of cv's which does
>> incur extra overhead, as each cv has to be init'd and destroy'd and carries
>> a
>> linked list around with it.  The extra storage overhead doesn't outweight
>> the
>> speed increase (from lack of the hash lookup) in all cases I think, so I'm
>> not
>> sure we want to axe tsleep() just yet.  If you axe tsleep() then asleep()
>> can
>> be emulated by either passing cv's around between functions.
> 
> I'll ask the same question I asked the POSIX committee about
> mutex initialization:
> 
> Why is a non-default initialization required?
> 
> Why explicitly choose an implementation that doesn't permit
> static instances to be declared and used, without explicit
> initialization?
> 
> 
> What is the freaking problem with "zero" not being a perfectly
> valid number in this warped philosophy?
> 
> 
> Pick a "just initialized" state that equals "all zeros".

Well, you could do an evil ugly gross hack trick thing where on the first
action on the cv you check if it is all zero's and init it if not, but that is
just gross.  What is wrong with properly keeping track of your data structures
anyways?

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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