X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fwin32%2FIOManager.c;h=764be698722627b2b92c5cbfa20ae04b38e919ff;hb=ed12b7043fa98928f75c289a756fbcef546315f8;hp=993b1fb7170612d459cbb0a2db87bcda37210e2b;hpb=7cb50e3aea11f934fd1430c5f056f4f0f93f1f23;p=ghc-hetmet.git diff --git a/rts/win32/IOManager.c b/rts/win32/IOManager.c index 993b1fb..764be69 100644 --- a/rts/win32/IOManager.c +++ b/rts/win32/IOManager.c @@ -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