OSDN Git Service

Test the lock shape before falling into the thin lock code. The
authorCarl Shapiro <cshapiro@google.com>
Tue, 26 Jan 2010 21:22:04 +0000 (13:22 -0800)
committerCarl Shapiro <cshapiro@google.com>
Tue, 26 Jan 2010 22:06:59 +0000 (14:06 -0800)
commitef5b4d3a0db17756c0e9bb90f14e18c4bf17a446
tree6c8f775aa3aeef6ca95d171f737fa11467054182
parent07b359273a838a15accafefcbe861be15caaac3a
Test the lock shape before falling into the thin lock code.  The
original formulation of this code relied on the subtly that the low
bit of a thread id is always 1 and so the shape bit was punned with
LSB of the thread id.  This got us two tests for the price of one.
When this code was moved forward to the new lock encoding scheme, we
did not crack the test in two.  This should correct the oversight.
vm/Sync.c