harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r525511 - in /harmony/enhanced/drlvm/trunk/vm/vmcore: include/vm_threads.h src/init/vm_shutdown.cpp src/util/linux/signals_em64t.cpp src/util/linux/signals_ia32.cpp src/util/linux/signals_ipf.cpp src/util/win/nt_platform_utils.cpp
Date Wed, 04 Apr 2007 13:51:26 GMT
Author: gshimansky
Date: Wed Apr  4 06:51:25 2007
New Revision: 525511

URL: http://svn.apache.org/viewvc?view=rev&rev=525511
Log:
Applied HARMONY-3527 [drlvm][winx64][threading] HWA fails with threading commits r523754 and
r523782


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_threads.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_threads.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_threads.h?view=diff&rev=525511&r1=525510&r2=525511
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_threads.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/vm_threads.h Wed Apr  4 06:51:25 2007
@@ -180,7 +180,7 @@
 inline VM_thread *get_vm_thread_fast_self() {
 	register hythread_t thr = hythread_self();
 
-    return (VM_thread *)hythread_tls_get(thr, TM_THREAD_VM_TLS_KEY);
+    return thr ? ((VM_thread *)hythread_tls_get(thr, TM_THREAD_VM_TLS_KEY)) : NULL;
 }
 
 inline VM_thread *get_vm_thread(hythread_t thr) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp?view=diff&rev=525511&r1=525510&r2=525511
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_shutdown.cpp Wed Apr  4 06:51:25 2007
@@ -206,6 +206,10 @@
     status = jthread_detach(java_thread);
     if (status != TM_ERROR_NONE) return JNI_ERR;
 
+    // Shutdown signals
+    extern void shutdown_signals();
+    shutdown_signals();
+
     // Call Agent_OnUnload() for agents and unload agents.
     java_vm->vm_env->TI->Shutdown(java_vm);
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp?view=diff&rev=525511&r1=525510&r2=525511
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp Wed Apr  4 06:51:25
2007
@@ -579,3 +579,7 @@
     get_executable_name(executable, sizeof(executable));
 
 } //initialize_signals
+
+void shutdown_signals() {
+    //FIXME: should be defined in future
+} //shutdown_signals
\ No newline at end of file

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp?view=diff&rev=525511&r1=525510&r2=525511
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp Wed Apr  4 06:51:25
2007
@@ -786,3 +786,7 @@
     }
 
 } //initialize_signals
+
+void shutdown_signals() {
+    //FIXME: should be defined in future
+} //shutdown_signals
\ No newline at end of file

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp?view=diff&rev=525511&r1=525510&r2=525511
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp Wed Apr  4 06:51:25
2007
@@ -427,7 +427,9 @@
     }
 } //initialize_signals
 
-
+void shutdown_signals() {
+    //FIXME: should be defined in future
+} //shutdown_signals
 
 #if 0
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp?view=diff&rev=525511&r1=525510&r2=525511
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/nt_platform_utils.cpp Wed Apr  4 06:51:25
2007
@@ -52,6 +52,8 @@
     return FALSE; 
 } 
 
+static PVOID veh = NULL;
+
 void initialize_signals(){
     TRACE2("signals", "Setting console control handle...");
     BOOL ok = SetConsoleCtrlHandler( (PHANDLER_ROUTINE) ctrl_handler, TRUE); 
@@ -59,10 +61,16 @@
 
     // add VEH to catch NPE's from bytecode
     TRACE2("signals", "Adding vectored exception handler...");
-    PVOID res;
-    res = AddVectoredExceptionHandler(0, vectored_exception_handler);
-    assert(res);
+    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
+    assert(veh);
 }
+
+void shutdown_signals() {
+    TRACE2("signals", "Removing vectored exception handler...");
+    ULONG res;
+    res = RemoveVectoredExceptionHandler(veh);
+    assert(res);
+} //shutdown_signals
 
 //The following is for socket error handling
 const char *sock_errstr[] = { 



Mime
View raw message