
As for more efficient lock-free impleentations (using CAS) Microsoft
has
(relatively recently) added singly linked lock-free list to Win32 API. There
could you post a link? thanks.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas...
Exported from kernel32 but only on XP and Server 2003.
FWIW implementing a queue (it's structured like a list but you can't really walk it short of removing entries from the head) is fairly trivial on x86. VC 8 introduces support for certain intrinsics (which the compiler knows enough about to apply optimizations) including the one corresponding to an interlocked cmpxchg8b. Most other compilers targetting x86 should at least provide it via inline asm or a separate assembler. It's probably much harder for certain other architectures. -hg