"The intent is that vendors will specialize a fully-general locking
implementation of a generic atomic template with implementations using
hardware primitives when those primitives are applicable."
Doesn't that explicitly prevent the operations to be implemented in a
lock-free way if hardware primitives don't exist for the size/alignment
of the type?
As far as I know, there are multiple lock-free algorithms to implement
CASN (multi-word compare and swap) with CAS.
Wouldn't it be worth consideration?
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std...@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]