On Mon, 2008-02-11 at 14:31 -0600, Olof Johansson wrote:
There is a strong dependency on execution order in this testcase.
Between cpu affinity and giving the child a little head start to reduce
the chance (100% if child wakes on same CPU and doesn't preempt parent)
of busy wait, modified testcase behaves. I don't think I should need
the CPU affinity, but I do.
If you plunk a usleep(1) in prior to calling thread_func() does your
testcase performance change radically? If so, I wonder if the real
application has the same kind of dependency.
-Mike