Open GoogleCodeExporter opened 9 years ago
As to my understanding it is generally wrong to not using atomic operation here.
We may feel OK with preemption, but the real problem is write barrier:
generally arithmetic done in registers but the compiler may optimize load/store
operation on time line.
So we need a hint to compiler (spinlock does it), or use assembler, or modern
http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Atomic-Builtins.html#Atomic-Builtins
Original comment by leonid.p...@gmail.com
on 11 Nov 2009 at 12:34
Original comment by dmitry.zavalishin@gmail.com
on 3 Oct 2010 at 9:10
tests too!
Original comment by dmitry.zavalishin@gmail.com
on 3 Mar 2011 at 9:41
btw, concurrent inc/dec tests show no problems. Bad tests? :)
Original comment by dmitry.zavalishin@gmail.com
on 11 Mar 2011 at 11:23
Original issue reported on code.google.com by
dmitry.zavalishin@gmail.com
on 13 Aug 2009 at 9:27