harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r488344 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
Date Mon, 18 Dec 2006 17:10:45 GMT
Author: gshimansky
Date: Mon Dec 18 09:10:45 2006
New Revision: 488344

URL: http://svn.apache.org/viewvc?view=rev&rev=488344
Log:
Applied HARMONY-2775 vm/vmcore/src/class_support/classloader.cpp

Tests passed on Ubuntu6 and Windows 2003 server x86


Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp?view=diff&rev=488344&r1=488343&r2=488344
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp Mon Dec 18 09:10:45
2006
@@ -638,6 +638,14 @@
             TRACE2("classloader.collisions",
                 this << " Collision while loading class " << className->bytes);
             if(m_loader == NULL) {
+                if(loading->AlreadyWaiting(cur_thread)) {
+                    // we spinned one time already;
+                    // loading in some other thread failed
+                    // so, lets try to load once again in this thread
+                    loading->SetInitiator(cur_thread);
+                    loading->RemoveWaitingThread(cur_thread, this, className);
+                    return NULL;
+                }
                 // avoid preliminary removal of LoadingClass
                 loading->AddWaitingThread(cur_thread, this, className);
                 // lazy wait event creation



Mime
View raw message