Date: Tue, 16 Jan 2001 20:26:02 +0200 From: Mark Murray <mark@grondar.za> To: Matt Dillon <dillon@earth.backplane.com> Cc: John Baldwin <jhb@FreeBSD.ORG>, jake@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: Atomic ops (Was Re: cvs commit: src/sys/i386/include atomic. Message-ID: <200101161826.f0GIPwI33543@gratis.grondar.za> In-Reply-To: <200101161749.f0GHnQD14640@earth.backplane.com> ; from Matt Dillon <dillon@earth.backplane.com> "Tue, 16 Jan 2001 09:49:26 PST." References: <200101161749.f0GHnQD14640@earth.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> A bottom half / top half circular FIFO does not need to use atomic ops > at all. The writer simply manipulates the WIndex and the reader > simply manipulates the RIndex. If you have multiple readers or > multiple writers, then you have a locking issue, but if you don't there > are no issues. I have multiple writers, and a single reader. Perhaps making the issue easier is the fact that I don't mind losing harvested events, so if a writer can't write, tough luck, do nothing and return. > On a non-intel box that does not guarentee write ordering, you would > need a memory barrier function prior to updating the WIndex to > ensure that the FIFO data is in place as of the time the reader tests > its RIndex against the WIndex. This is the way I've got it, more-or-less. I'm hoping for a method that does not involve memory barriers, if I can. I'm playing with ideas right now. M -- Mark Murray Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101161826.f0GIPwI33543>