diff options
| author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-23 13:51:58 +0000 |
|---|---|---|
| committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-23 13:51:58 +0000 |
| commit | 1db54b255f569d273de3d11d958fb4395a3ae58f (patch) | |
| tree | 5aa7ac0da62ededbaab14350de950b012a5759a3 /libjava/interpret.cc | |
| parent | 74140efd05d39fbd8aa69c996e30f451ac71691b (diff) | |
| download | ppe42-gcc-1db54b255f569d273de3d11d958fb4395a3ae58f.tar.gz ppe42-gcc-1db54b255f569d273de3d11d958fb4395a3ae58f.zip | |
2008-09-17 Andrew Haley <aph@redhat.com>
PR libgcj/8995:
* defineclass.cc (_Jv_ClassReader::handleCodeAttribute):
Initialize thread_count.
* include/java-interp.h (_Jv_InterpMethod::thread_count): New
field.
(_Jv_InterpMethod::rewrite_insn_mutex): New mutex.
(_Jv_InterpFrame:: _Jv_InterpFrame): Pass frame_type.
* interpret.cc
(ThreadCountAdjuster): New class.
(_Jv_InterpMethod::thread_count): New field.
(_Jv_InitInterpreter): Initialize rewrite_insn_mutex.
Increment and decrement thread_count field in methods.
* interpret-run.cc (REWRITE_INSN): Check thread_count <= 1.
(REWRITE_INSN): Likewise.
Declare a ThreadCountAdjuster.
* java/lang/reflect/natVMProxy.cc (run_proxy): Initialize frame
type as frame_proxy.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140593 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/interpret.cc')
| -rw-r--r-- | libjava/interpret.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libjava/interpret.cc b/libjava/interpret.cc index 6153c542036..dc1114f65f1 100644 --- a/libjava/interpret.cc +++ b/libjava/interpret.cc @@ -78,10 +78,15 @@ static void find_catch_location (jthrowable, jthread, jmethodID *, jlong *); // the Class monitor as user code in another thread could hold it. static _Jv_Mutex_t compile_mutex; +// See class ThreadCountAdjuster and REWRITE_INSN for how this is +// used. +_Jv_Mutex_t _Jv_InterpMethod::rewrite_insn_mutex; + void _Jv_InitInterpreter() { _Jv_MutexInit (&compile_mutex); + _Jv_MutexInit (&_Jv_InterpMethod::rewrite_insn_mutex); } #else void _Jv_InitInterpreter() {} |

