Free more things that we allocate
[ghc-hetmet.git] / rts / win32 / IOManager.c
index 993b1fb..764be69 100644 (file)
@@ -4,6 +4,9 @@
  *
  * (c) sof, 2002-2003.
  */
+
+#if !defined(THREADED_RTS)
+
 #include "Rts.h"
 #include "IOManager.h"
 #include "WorkQueue.h"
@@ -340,7 +343,7 @@ depositWorkItem( unsigned int reqID,
        if ( (ioMan->workersIdle < ioMan->queueSize) ) {
            /* No, go ahead and create another. */
            ioMan->numWorkers++;
-           if (NewIOWorkerThread(ioMan)) {
+           if (!NewIOWorkerThread(ioMan)) {
                ioMan->numWorkers--;
            }
        }
@@ -526,3 +529,5 @@ abandonWorkRequest ( int reqID )
      */
     LeaveCriticalSection(&ioMan->active_work_lock);
 }
+
+#endif