From owner-freebsd-arch Wed Jan 17 23:30:27 2001 Delivered-To: freebsd-arch@freebsd.org Received: from moby.geekhouse.net (moby.geekhouse.net [64.81.6.36]) by hub.freebsd.org (Postfix) with ESMTP id 3F07C37B401 for ; Wed, 17 Jan 2001 23:30:09 -0800 (PST) Received: from laptop.baldwin.cx (john@dhcp150.geekhouse.net [192.168.1.150]) by moby.geekhouse.net (8.11.0/8.9.3) with ESMTP id f0I7Xos67077; Wed, 17 Jan 2001 23:33:58 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200101180330.UAA25782@usr08.primenet.com> Date: Wed, 17 Jan 2001 23:29:47 -0800 (PST) From: John Baldwin To: Terry Lambert Subject: Re: HEADS-UP: await/asleep removal imminent Cc: (Alfred Perlstein) , (Randell Jesup) , arch@FreeBSD.org, (Jason Evans) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 -- 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