OSDN Git Service

Hoist shape discrimination above thin lock owner test in the lock
authorCarl Shapiro <cshapiro@google.com>
Mon, 8 Mar 2010 22:38:42 +0000 (14:38 -0800)
committerCarl Shapiro <cshapiro@google.com>
Mon, 8 Mar 2010 22:55:43 +0000 (14:55 -0800)
commit147dd3f9f0905dfc6687843a6ca3276031067505
tree9a73736fc198419cd0cc358cf9d7efc7c6c525e2
parentd682adface0ef5679e0f272ad7f50deb713b6a5b
Hoist shape discrimination above thin lock owner test in the lock
procedure.  It is unsafe to reckon a thin lock owner without having
first determined that the bit pattern of the lock word corresponds to
that of a thin lock.  Without proper ordering, a monitor lock can and
will be created which, excluding the shape bit, corresponds to a lock
owned by the calling thread.

In addition, move compiler barriers so they immediately preceed base
address publication.  Also, kill cargo-cult volatiles that confounded
my bug hunt.
vm/Sync.c