mirror of git://gcc.gnu.org/git/gcc.git
natClassLoader.cc (_Jv_WaitForState): Call _Jv_PrepareCompiledClass while holding class mutex.
* java/lang/natClassLoader.cc (_Jv_WaitForState): Call _Jv_PrepareCompiledClass while holding class mutex. From-SVN: r29063
This commit is contained in:
parent
8012c98334
commit
773c6f0076
|
@ -1,3 +1,8 @@
|
||||||
|
1999-09-02 Tom Tromey <tromey@cygnus.com>
|
||||||
|
|
||||||
|
* java/lang/natClassLoader.cc (_Jv_WaitForState): Call
|
||||||
|
_Jv_PrepareCompiledClass while holding class mutex.
|
||||||
|
|
||||||
1999-09-01 Tom Tromey <tromey@cygnus.com>
|
1999-09-01 Tom Tromey <tromey@cygnus.com>
|
||||||
|
|
||||||
* include/posix-threads.h (PTHREAD_MUTEX_IS_STRUCT): New define.
|
* include/posix-threads.h (PTHREAD_MUTEX_IS_STRUCT): New define.
|
||||||
|
|
|
@ -144,8 +144,10 @@ _Jv_WaitForState (jclass klass, int state)
|
||||||
|
|
||||||
if (state == JV_STATE_LINKED)
|
if (state == JV_STATE_LINKED)
|
||||||
{
|
{
|
||||||
_Jv_MonitorExit (klass);
|
// Must call _Jv_PrepareCompiledClass while holding the class
|
||||||
|
// mutex.
|
||||||
_Jv_PrepareCompiledClass (klass);
|
_Jv_PrepareCompiledClass (klass);
|
||||||
|
_Jv_MonitorExit (klass);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +219,7 @@ _Jv_PrepareCompiledClass(jclass klass)
|
||||||
if (klass->state >= JV_STATE_LINKED)
|
if (klass->state >= JV_STATE_LINKED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// short-circuit, so that mutually dependent classes are ok
|
// Short-circuit, so that mutually dependent classes are ok.
|
||||||
klass->state = JV_STATE_LINKED;
|
klass->state = JV_STATE_LINKED;
|
||||||
|
|
||||||
_Jv_Constants *pool = &klass->constants;
|
_Jv_Constants *pool = &klass->constants;
|
||||||
|
|
Loading…
Reference in New Issue