Mercurial > hg > truffle
comparison src/cpu/zero/vm/cppInterpreter_zero.cpp @ 1345:747d26efc5fa
6939180: Zero locking fix
Summary: When Zero is running with Shark enabled threads can be left with their _do_not_unlock_if_synchronized flag incorrectly set.
Reviewed-by: twisti
Contributed-by: Gary Benson <gbenson@redhat.com>
author | twisti |
---|---|
date | Tue, 30 Mar 2010 00:57:55 -0700 |
parents | c09ee209b65c |
children | f9271ff9d324 |
comparison
equal
deleted
inserted
replaced
1344:fdd57634910e | 1345:747d26efc5fa |
---|---|
204 goto unwind_and_return; | 204 goto unwind_and_return; |
205 } | 205 } |
206 | 206 |
207 // Update the invocation counter | 207 // Update the invocation counter |
208 if ((UseCompiler || CountCompiledCalls) && !method->is_synchronized()) { | 208 if ((UseCompiler || CountCompiledCalls) && !method->is_synchronized()) { |
209 thread->set_do_not_unlock(); | |
210 InvocationCounter *counter = method->invocation_counter(); | 209 InvocationCounter *counter = method->invocation_counter(); |
211 counter->increment(); | 210 counter->increment(); |
212 if (counter->reached_InvocationLimit()) { | 211 if (counter->reached_InvocationLimit()) { |
213 CALL_VM_NOCHECK( | 212 CALL_VM_NOCHECK( |
214 InterpreterRuntime::frequency_counter_overflow(thread, NULL)); | 213 InterpreterRuntime::frequency_counter_overflow(thread, NULL)); |
215 if (HAS_PENDING_EXCEPTION) | 214 if (HAS_PENDING_EXCEPTION) |
216 goto unwind_and_return; | 215 goto unwind_and_return; |
217 } | 216 } |
218 thread->clr_do_not_unlock(); | |
219 } | 217 } |
220 | 218 |
221 // Lock if necessary | 219 // Lock if necessary |
222 BasicObjectLock *monitor; | 220 BasicObjectLock *monitor; |
223 monitor = NULL; | 221 monitor = NULL; |