dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnet ChangeLog engine/jitc_delegate.c


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] pnet ChangeLog engine/jitc_delegate.c
Date: Thu, 15 Feb 2007 19:04:47 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    pnet
Changes by:     Klaus Treichel <ktreichel>      07/02/15 19:04:47

Modified files:
        .              : ChangeLog 
        engine         : jitc_delegate.c 

Log message:
        2007-02.15  Klaus Treichel  <address@hidden>
        
                * engine/jitc_delegate.c: Fix a deadlock introduced with my 
last cctor
                manager change. The functions to lookup the methods *MUST* not 
lock the
                metadata.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3418&r2=1.3419
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/jitc_delegate.c?cvsroot=dotgnu-pnet&r1=1.10&r2=1.11

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3418
retrieving revision 1.3419
diff -u -b -r1.3418 -r1.3419
--- ChangeLog   13 Feb 2007 21:28:32 -0000      1.3418
+++ ChangeLog   15 Feb 2007 19:04:47 -0000      1.3419
@@ -1,3 +1,9 @@
+2007-02.15  Klaus Treichel  <address@hidden>
+
+       * engine/jitc_delegate.c: Fix a deadlock introduced with my last cctor
+       manager change. The functions to lookup the methods *MUST* not lock the
+       metadata.
+
 2007-02-13  Klaus Treichel  <address@hidden>
 
        * engine/jitc_delegate.c: remove the dumps from the on demand compiler

Index: engine/jitc_delegate.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/jitc_delegate.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- engine/jitc_delegate.c      13 Feb 2007 21:28:32 -0000      1.10
+++ engine/jitc_delegate.c      15 Feb 2007 19:04:47 -0000      1.11
@@ -45,6 +45,11 @@
 #ifdef IL_JITC_FUNCTIONS
 
 /*
+ * The class name for the AsyncResult.
+ */
+static const char *asyncResultClassName = 
"System.Runtime.Remoting.Messaging.AsyncResult";
+
+/*
  * Pack the delegate invoke arguments into an "Object[]" array and return the
  * new array.
  */
@@ -483,11 +488,10 @@
        ILType *beginInvokeSignature = ILMethod_Signature(beginInvokeMethod);
        ILJitType jitSignature = jit_function_get_signature(func);
        unsigned int numBeginInvokeParams = jit_type_num_params(jitSignature);
-       ILMethod *asyncResultCtor = ILExecThreadLookupMethod(_thread,
-                                                               
"System.Runtime.Remoting.Messaging.AsyncResult",
-                                                               ".ctor",
-                                                               
"(ToSystem.Delegate;[oSystem.Object;oSystem.AsyncCallback;oSystem.Object;)V");
-       ILClass *asyncResultInfo = 0;
+       ILClass *asyncResultInfo = _ILLookupClass(_ILExecThreadProcess(_thread),
+                                                                               
          asyncResultClassName,
+                                                                               
          strlen(asyncResultClassName));
+       ILMethod *asyncResultCtor = 0;
        ILJitFunction jitAsyncResultCtor = 0;
        
 #if !defined(IL_CONFIG_REDUCE_CODE) && !defined(IL_WITHOUT_TOOLS) && 
defined(_IL_JIT_ENABLE_DEBUG)
@@ -513,6 +517,17 @@
        }
 #endif
 
+       /* Check if the class AsyncResult was found. */
+       if(!asyncResultInfo)
+       {
+               return JIT_RESULT_COMPILE_ERROR;
+       }
+
+       asyncResultCtor = ILExecThreadLookupMethodInClass(_thread,
+                                                               asyncResultInfo,
+                                                               ".ctor",
+                                                               
"(ToSystem.Delegate;[oSystem.Object;oSystem.AsyncCallback;oSystem.Object;)V");
+
        /* Check if the ctor for AsyncResult class was found. */
        if(!asyncResultCtor)
        {
@@ -599,10 +614,10 @@
        ILType *endInvokeSignature = ILMethod_Signature(endInvokeMethod);
        ILJitType jitSignature = jit_function_get_signature(func);
        unsigned int numEndInvokeParams = jit_type_num_params(jitSignature);
-       ILMethod *asyncEndInvokeMethodInfo = ILExecThreadLookupMethod(_thread,
-                                                                               
"System.Runtime.Remoting.Messaging.AsyncResult",
-                                                                               
"EndInvoke",
-                                                                               
"(T[oSystem.Object;)oSystem.Object;");
+       ILClass *asyncResultInfo = _ILLookupClass(_ILExecThreadProcess(_thread),
+                                                                               
          asyncResultClassName,
+                                                                               
          strlen(asyncResultClassName));
+       ILMethod *asyncEndInvokeMethodInfo = 0;
        ILJitValue array;         /* Array to hold the out params. */
        ILJitValue returnObject;  /* returnvalue of the call to 
IAsyncResult.EndInvoke. */
        ILJitFunction jitEndInvoke;
@@ -634,6 +649,17 @@
        }
 #endif
 
+       /* Check if the class AsyncResult was found. */
+       if(!asyncResultInfo)
+       {
+               return JIT_RESULT_COMPILE_ERROR;
+       }
+
+       asyncEndInvokeMethodInfo = ILExecThreadLookupMethodInClass(_thread,
+                                                                               
asyncResultInfo,
+                                                                               
"EndInvoke",
+                                                                               
"(T[oSystem.Object;)oSystem.Object;");
+
        /* Check if the EndInvoke Method for AsyncResult class was found. */
        if(!asyncEndInvokeMethodInfo)
        {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]