[mapserver-commits] r9373 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Oct 1 18:12:26 EDT 2009


Author: warmerdam
Date: 2009-10-01 18:12:26 -0400 (Thu, 01 Oct 2009)
New Revision: 9373

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapthread.c
Log:
thread debugging output cannot go through msDebug which depends on locking

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-10-01 22:11:01 UTC (rev 9372)
+++ trunk/mapserver/HISTORY.TXT	2009-10-01 22:12:26 UTC (rev 9373)
@@ -16,7 +16,9 @@
 
 - Fix raster thread deadlock condition on posix/linux (#3145)
 
+- Do not route thread debug output through msDebug which requires locking.
 
+
 Version 5.6.0-beta2 (2009-10-01):
 ---------------------------------
 

Modified: trunk/mapserver/mapthread.c
===================================================================
--- trunk/mapserver/mapthread.c	2009-10-01 22:11:01 UTC (rev 9372)
+++ trunk/mapserver/mapthread.c	2009-10-01 22:12:26 UTC (rev 9373)
@@ -140,7 +140,7 @@
 MS_CVSID("$Id$")
 
 #if defined(USE_THREAD)
-static int thread_debug = 0;
+static int thread_debug = 1;
 
 static char *lock_names[] = 
 { NULL, "PARSER", "GDAL", "ERROROBJ", "PROJ", "TTF", "POOL", "SDE", 
@@ -170,7 +170,7 @@
     static pthread_mutex_t core_lock = PTHREAD_MUTEX_INITIALIZER;
 
     if( thread_debug )
-        msDebug( "msThreadInit() (posix)\n" );
+        fprintf( stderr, "msThreadInit() (posix)\n" );
 
     pthread_mutex_lock( &core_lock );
 
@@ -203,7 +203,7 @@
     assert( nLockId >= 0 && nLockId < mutexes_initialized );
 
     if( thread_debug )
-        msDebug( "msAcquireLock(%d/%s) (posix)\n", 
+        fprintf( stderr, "msAcquireLock(%d/%s) (posix)\n", 
                  nLockId, lock_names[nLockId] );
 
     pthread_mutex_lock( mutex_locks + nLockId );
@@ -220,7 +220,7 @@
     assert( nLockId >= 0 && nLockId < mutexes_initialized );
 
     if( thread_debug )
-        msDebug( "msReleaseLock(%d/%s) (posix)\n", 
+        fprintf( stderr, "msReleaseLock(%d/%s) (posix)\n", 
                  nLockId, lock_names[nLockId] );
 
     pthread_mutex_unlock( mutex_locks + nLockId );
@@ -255,7 +255,7 @@
         return;
 
     if( thread_debug )
-        msDebug( "msThreadInit() (win32)\n" );
+        fprintf( stderr, "msThreadInit() (win32)\n" );
 
     if( core_lock == NULL )
         core_lock = CreateMutex( NULL, TRUE, NULL );
@@ -291,7 +291,7 @@
     assert( nLockId >= 0 && nLockId < mutexes_initialized );
 
     if( thread_debug )
-        msDebug( "msAcquireLock(%d/%s) (win32)\n", 
+        fprintf( stderr, "msAcquireLock(%d/%s) (win32)\n", 
                  nLockId, lock_names[nLockId] );
 
     WaitForSingleObject( mutex_locks[nLockId], INFINITE );
@@ -308,7 +308,7 @@
     assert( nLockId >= 0 && nLockId < mutexes_initialized );
 
     if( thread_debug )
-        msDebug( "msReleaseLock(%d/%s) (win32)\n", 
+        fprintf( stderr, "msReleaseLock(%d/%s) (win32)\n", 
                  nLockId, lock_names[nLockId] );
 
     ReleaseMutex( mutex_locks[nLockId] );



More information about the mapserver-commits mailing list