You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2006/02/13 12:42:28 UTC

svn commit: r377351 - /webservices/axis2/trunk/c/modules/platforms/windows/thread_mutex_windows.c

Author: damitha
Date: Mon Feb 13 03:42:23 2006
New Revision: 377351

URL: http://svn.apache.org/viewcvs?rev=377351&view=rev
Log:
mutex header change

Modified:
    webservices/axis2/trunk/c/modules/platforms/windows/thread_mutex_windows.c

Modified: webservices/axis2/trunk/c/modules/platforms/windows/thread_mutex_windows.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/platforms/windows/thread_mutex_windows.c?rev=377351&r1=377350&r2=377351&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/platforms/windows/thread_mutex_windows.c (original)
+++ webservices/axis2/trunk/c/modules/platforms/windows/thread_mutex_windows.c Mon Feb 13 03:42:23 2006
@@ -15,7 +15,7 @@
  */
 
 
-#include <axis2_thread_mutex.h>
+#include <axis2_thread.h>
 #include "axis2_thread_mutex_windows.h"
 
 static axis2_status_t thread_mutex_cleanup(void *data)
@@ -42,7 +42,7 @@
 
     mutex = (axis2_thread_mutex_t *)AXIS2_MALLOC(allocator, sizeof(*mutex));
 
-    if (flags & AXIS2_THREAD_MUTEX_UNNESTED) 
+    if (flags == AXIS2_THREAD_MUTEX_DEFAULT) /*unnested*/
 	{
         /* Use an auto-reset signaled event, ready to accept one
          * waiting thread.
@@ -78,15 +78,12 @@
 
 AXIS2_DECLARE(axis2_status_t) axis2_thread_mutex_trylock(axis2_thread_mutex_t *mutex)
 {
-	/*TODO:implement trylock for critical section*/
-    /*if (mutex->type == thread_mutex_critical_section) 
+	
+    if (mutex->type == thread_mutex_critical_section) 
 	{
-        if (!TryEnterCriticalSection(&mutex->section)) 
-		{
-            return AXIS2_FAILURE; //return APR_EBUSY;
-        }
+        /*TODO:implement trylock for critical section*/
     }
-    else*/ 
+    else 
 	{
         DWORD rv = WaitForSingleObject(mutex->handle, 0);
 		if ((rv != WAIT_OBJECT_0) && (rv != WAIT_ABANDONED))