Nonblocking multiprocessor/multithread algorithms in C++

  • Author or source: moc.oohay@ralohcshsoj
  • Type: queue, stack, garbage collection, memory allocation, templates for atomic algorithms and types
  • Created: 2004-04-07 09:38:12
  • Linked files: ATOMIC.H.
notes
see linked file...

Comments

This code has a problem with operation exceeding 4G times.  If you do more then 4G of Put and Get with the MPQueue, "AtomicUInt & Index(int i) { return data[i & (len-1)];} will cause BUG.
Modular operation with length of 2^n is OK, but not for other numbers.
My email does not have any "x" letters.
In MPCountStack::PopElement, what's to prevent another thread from deleting was.Value().ptr between assigning was and reading was.Value().ptr->next?