
31 Jan
2010
31 Jan
'10
12:20 a.m.
"Ronny Spiegel" <ronny.spiegel@googlemail.com> wrote in message news:d81ab4001001290608i31bed028u1d843faaa433ce33@mail.gmail.com...
Hi,
I was looking for some kind of atomic counter which is able to deal with 64 bit values on 32/64 bit machines.
I was just wondering if this could be done with this library on Windows (yes, I know). As far as I can see it uses the InterlockedIncrement() API methods internally. But for 64 bit values you have to use InterlockedIncrement64().
Has anyone of you tried this?
FWIW, you can do a loop-free 63-bit counter on a 32-bit machine by using the following clever algorithm from Joe Seigh: http://groups.google.com/group/comp.lang.asm.x86/browse_frm/thread/15271b4da...