[Pvfs2-cvs] commit by kunkel in pvfs2/src/io/job: thread-mgr.c

CVS commit program cvs at parl.clemson.edu
Tue Aug 29 06:41:19 EDT 2006


Update of /projects/cvsroot/pvfs2/src/io/job
In directory parlweb1:/tmp/cvs-serv30492/src/io/job

Modified Files:
      Tag: kunkel-branch
	thread-mgr.c 
Log Message:
Backmerge with HEAD


Index: thread-mgr.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/job/thread-mgr.c,v
diff -p -u -r1.30.6.2 -r1.30.6.3
--- thread-mgr.c	24 Jul 2006 17:20:45 -0000	1.30.6.2
+++ thread-mgr.c	29 Aug 2006 10:41:19 -0000	1.30.6.3
@@ -182,19 +182,22 @@ static void *bmi_thread_function(void *p
 	    }
 
 	    /* execute callback for each completed unexpected message */
-	    gen_mutex_lock(&bmi_mutex);
-	    for(i=0; i<outcount; i++)
-	    {
-		bmi_unexp_fn(&stat_bmi_unexp_array[i]);
-		bmi_unexp_count--;
-	    }
-	    gen_mutex_unlock(&bmi_mutex);
+            if (outcount > 0)
+            {
+                gen_mutex_lock(&bmi_mutex);
+                for (i=0; i<outcount; i++)
+                {
+                    bmi_unexp_fn(&stat_bmi_unexp_array[i]);
+                    bmi_unexp_count--;
+                }
+                gen_mutex_unlock(&bmi_mutex);
+            }
 
 	    /* set a flag if we are getting as many incoming BMI unexpected
 	     * operations as we can handle to indicate that we should cycle
 	     * quickly 
 	     */
-	    if(outcount == THREAD_MGR_TEST_COUNT)
+	    if (outcount == THREAD_MGR_TEST_COUNT)
 		quick_flag = 1;
 	}
 	else



More information about the Pvfs2-cvs mailing list