On Windows, Delete the CriticalSection's we Initialize
authorIan Lynagh <igloo@earth.li>
Sun, 25 Nov 2007 12:58:45 +0000 (12:58 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 25 Nov 2007 12:58:45 +0000 (12:58 +0000)
rts/win32/AsyncIO.c
rts/win32/IOManager.c
rts/win32/WorkQueue.c

index 20de8bb..54fc5cb 100644 (file)
@@ -189,6 +189,7 @@ shutdownAsyncIO(rtsBool wait_threads)
         CloseHandle(completed_table_sema);
        completed_table_sema = NULL;
     }
+    DeleteCriticalSection(&queue_lock);
 }
 
 /*
index 6e7cd25..81dedda 100644 (file)
@@ -461,6 +461,8 @@ void ShutdownIOManager ( rtsBool wait_threads )
         }
         FreeWorkQueue(ioMan->workQueue);
         CloseHandle(ioMan->hExitEvent);
+        DeleteCriticalSection(&ioMan->active_work_lock);
+        DeleteCriticalSection(&ioMan->manLock);
         free(ioMan);
         ioMan = NULL;
     }
index a0b06f3..b676072 100644 (file)
@@ -82,6 +82,7 @@ FreeWorkQueue ( WorkQueue* pq )
   if ( pq->roomAvailable ) {
     CloseHandle(pq->roomAvailable);
   }
+  DeleteCriticalSection(&pq->queueLock);
   free(pq);
   return;
 }