Pass 2.3

Doug Lea dl at cs.oswego.edu
Sat Sep 11 12:11:35 BST 2004


> Minor point for future discussion: If you implement atomics with
> private locks, you also need to disable signals.  (Atomic_ops can do
> this as a last resort.)  It may be cheaper to just do the emulation in
> the kernel.  I dimly recall that this was done for AIX on Power a long
> time ago.

I probably also should have mentioned that on most small embedded
systems you can just disable interrupts etc to emulate atomics. (I
suppose it is implicit though in that this is also how some of them
implement locks.)


> I'm still not sure there are actually important architectures with the
> problem you mention below.  It is something to look at, though.

I believe the Alpha had this problem. Even if alphas never meet next
C++ standard, probably some processor designer will someday decide to
also make a chip with word-tearing problems.

-Doug






More information about the cpp-threads mailing list