From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Fri, 9 Dec 2005 12:39:58 -0500 From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] const In-Reply-To: <4399B85E.1050706@lanl.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <3e1162e60512090825n4d944cc8yb2f668e3deb64dec@mail.gmail.com> <4399B85E.1050706@lanl.gov> Topicbox-Message-UUID: c036ae9a-ead0-11e9-9d60-3106f5b1d025 > and, stuff that tickles hardware. Refer to the old crazy stuff bsd did > in the early 80s to get around those issues and still optimize drivers. > Now, wonder if that script could even be found at this point. > > I think I missed the part of the discussion that explains how to do > mmap'ed I/O without volatile, and a good idea of how to tweak the > compiler, such that: > > while (x->statux & BUSY) > ; > > works. If the answer is "don't optimize that functions, you idiot!" I'm > actually ok with that. On Plan 9, the compiler does not cache the results of explicit memory reads like x->status. So this is not a problem. Russ