How does the openjdk deal with stack lock's recursive exit

wei he antcrawlerster at gmail.com
Thu Jun 16 08:07:31 PDT 2011


hi,
I read the synchronizer.cpp of the openjdk, and find it when use stack lock,
if the current thred recursive enter the stack lock, the stack lock's
displace header will be set null, and when the current thread want to
release the stack lock(i think by call the function slow_exit, which intrun
call the fast_exit), but i find that in the fast exit, when hotspot find
that stack lock's displace header is null, it will donothing, just return.
so my question is if this thread has recursive exit this stack lock
completely, and evry time the fast_exit function do nothing except find the
lock's displace header is null, how can this lock's state return to be
neutral? by the way, the code i read is openjdk-7-ea-src-b136-31_mar_2011.

Any suggestion is appreciated, thks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20110616/5ed2e920/attachment.html 


More information about the hotspot-runtime-dev mailing list