anyone familiar with the nuances of clone(2) care to comment? I am running the attached program on a quad machine with a inux version 2.6.11-1.1369_FC4smp ([email protected]) and gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
and I do not get a single counter increased by multiple threads, which is what I want.
I don't even seem to get four different counters incremented by multiple threads that are on the same CPU. It appears that all the threads are running their own counter, and all starting from 0.
Advice?