Re: [Sablevm-developer] question about _svmf_stop_the_world()
Brought to you by:
egagnon
From: Archie C. <ar...@de...> - 2003-03-31 06:00:37
|
Archie Cobbs wrote: > Why in _svmf_stop_the_world() do you increase "vm->pending_halt_thread_count" > for threads in state SVM_THREAD_STATUS_RUNNING_JAVA threads but not for > threads in state SVM_THREAD_STATUS_NOT_RUNNING_JAVA_RESUMING_ALLOWED? Ah.. now I think I see it.. It's because a thread's Java stack and its list of local native references (in fact, it's total Java state) cannot change while executing native code outside of libsablevm, because all JNI calls that would permit such a thread to modify its Java state begin with "_svmf_resuming_java()". So we can assume such threads are "halted" even if they're still executing.. and if they attempt to cross back into 'JAVA' mode they will see that resuming is disabled and then they will halt. Does this sound correct? Thanks, -Archie __________________________________________________________________________ Archie Cobbs * Precision I/O * http://www.precisionio.com |