News for hackers. Stuff that matters.
Re:Common Pitfalls in Writing Lock-Free Algorithms by CoolGuySteve on Wednesday March 27, 2013 @08:26PM (#5452765)
It may be lock free, but it's not very wait free.

Maybe I'm just tired, but OS X and Windows already have atomic lifo's that are much better: http://www.opensource.apple.com/source/Libc/Libc-763.13/i386...

(scroll to bottom, see declaration in /usr/include/libkern/OSAtomic.h)

http://msdn.microsoft.com/en-us/library/windows/desktop/ms68...

For linux, there's llist.h in the kernel, but I don't know of a userland version and I haven't used it.

Re:Common Pitfalls in Writing Lock-Free Algorithms by matthavener on Wednesday March 27, 2013 @09:18PM (#5452917)
The article demos a list, where threads are contending to append to the top of it. Unlike a list, there is not much contention on a FIFO unless its typically empty..
Re:Common Pitfalls in Writing Lock-Free Algorithms by CoolGuySteve on Wednesday March 27, 2013 @09:37PM (#5452964)
You are correct, I meant lifo but wrote fifo.

OSEnqueueAtomic/OSDequeueAtomic and InterlockedSList, by virtue of only being able to push and pop the head, are effectively LIFOs.

Re:Common Pitfalls in Writing Lock-Free Algorithms by zippie on Wednesday March 27, 2013 @11:55PM (#5453273)
There is, of sorts (rbtree), http://github.com/johnj/llds