Re: Totally Safe lock-free FIFO for arbitrary-sized items.
Jon Watte <[email protected]> Sun, 20 Aug 2006 19:40:13 -0700
| Newsgroups | gmane.games.devel.general |
|---|---|
| Message-ID | <[email protected]> |
Andras Balogh wrote:
> To answer your question, when I asked for a 64 bit FIFO, I was thinking of
> the fully generic FIFO's on 64bit systems, with unlimited queue length,
> and with multiple producer and consumer threads. In this case, all the
> solutions that I've found used linked lists with pointers, and required
> using an atomic compare-and-swap primitive that works on double the
> machine word size (so that you can use another machine word for ABA
> resolution), which is non existent for 64 bit systems (there's no
> cmpxchg16b AFAIK), hence my question.
>
Yes, if you want that, you'll need locking. Sucks but true.
Which is why I much prefer the single-writer, single-reader FIFO, which
solves 95% of the actual cases :-)
Cheers,
/ h+
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557