On Sun, Sep 16, 2001 at 12:55:10AM -0700, Justin Erenkrantz wrote: > The testlock case doesn't matter because it never hits any of the > Solaris-defined entry points. This is a quirk in the OS and I see > no reason to work around it. If you want to make testlock do the > right thing with the Solaris LWP model, use a reader/writer lock > to synchronize the starting of the threads. This way you guarantee > that all threads are started before you start execution of the > tight exclusive loop (which is something that testlock doesn't do > now). You are assuming that the threads are created in parallel - > nowhere is that ordering is guaranteed.
I noticed that your new testlockperf.c does exactly that (testlock.c doesn't). Do you still see the serialization on Solaris MP with LWPs? I will try running it here and see what happens. -- justin
