Hmm. That doesn't make sense. You have calls to rand in both examples.
The only difference being the frequency with which it is called; several thousand times more frequently in the first apparently non-locking example, than in the second apparently locking example. If rand were responsible for the locks then the first example should be the one to display the symptoms of them. Not the second.
Methinks you are misinterpreting your results.
In reply to Re^2: Solaris + UltraSparc T2 + Threads: Avoid LCK's
by BrowserUk
in thread Solaris + UltraSparc T2 + Threads: Avoid LCK's
by gulden
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |