Date: Thu, 05 Oct 2000 14:31:06 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Doug Rabson <dfr@nlsystems.com> Cc: msmith@FreeBSD.org, new-bus@FreeBSD.org Subject: Re: Generic memory barrier helper functions Message-ID: <XFMail.001005143106.jhb@FreeBSD.org> In-Reply-To: <Pine.BSF.4.21.0010040924060.94692-100000@salmon.nlsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 04-Oct-00 Doug Rabson wrote: > On Tue, 3 Oct 2000, John Baldwin wrote: > >> After talking with Mike, I whipped up some quick and dirty helper >> functions for a MI memory barrier API. Basically, you have the following >> four functions: >> >> barrier_acquire() - a read barrier >> barrier_release() - a write barrier >> barrier_fence() - a read/write barrier >> barrier_flush() - a barrier that flushes the CPU's cache >> >> I have a simple patch to implement all of these on both x86 and alpha >> with the exception of barrier_flush() on the alpha at >> http://www.FreeBSD.org/~jhb/patches/barrier.patch and inlined here: > > It seems like a good idea although I'm not quite sure the functions should > go in bus.h. I would probably have thought of putting them in atomic.h > since one of their most important uses is for SMP communication. True I suppose, but they depend on bus_space_barrier(), so I would have thought that they were really bus_space helper functions. Also, can you suggest a barrier_flush() for the alpha? > -- > Doug Rabson Mail: dfr@nlsystems.com -- 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-new-bus" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.001005143106.jhb>