projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove vectored returns.
[ghc-hetmet.git]
/
rts
/
win32
/
IOManager.c
diff --git
a/rts/win32/IOManager.c
b/rts/win32/IOManager.c
index
993b1fb
..
6af4245
100644
(file)
--- a/
rts/win32/IOManager.c
+++ b/
rts/win32/IOManager.c
@@
-4,6
+4,9
@@
*
* (c) sof, 2002-2003.
*/
*
* (c) sof, 2002-2003.
*/
+
+#if !defined(THREADED_RTS)
+
#include "Rts.h"
#include "IOManager.h"
#include "WorkQueue.h"
#include "Rts.h"
#include "IOManager.h"
#include "WorkQueue.h"
@@
-187,7
+190,7
@@
IOWorkerProc(PVOID param)
*
* Note: Sleep() is in milliseconds, not micros.
*/
*
* Note: Sleep() is in milliseconds, not micros.
*/
- Sleep(work->workData.delayData.msecs / 1000);
+ Sleep((work->workData.delayData.msecs + 999) / 1000);
len = work->workData.delayData.msecs;
complData = NULL;
fd = 0;
len = work->workData.delayData.msecs;
complData = NULL;
fd = 0;
@@
-340,7
+343,7
@@
depositWorkItem( unsigned int reqID,
if ( (ioMan->workersIdle < ioMan->queueSize) ) {
/* No, go ahead and create another. */
ioMan->numWorkers++;
if ( (ioMan->workersIdle < ioMan->queueSize) ) {
/* No, go ahead and create another. */
ioMan->numWorkers++;
- if (NewIOWorkerThread(ioMan)) {
+ if (!NewIOWorkerThread(ioMan)) {
ioMan->numWorkers--;
}
}
ioMan->numWorkers--;
}
}
@@
-526,3
+529,5
@@
abandonWorkRequest ( int reqID )
*/
LeaveCriticalSection(&ioMan->active_work_lock);
}
*/
LeaveCriticalSection(&ioMan->active_work_lock);
}
+
+#endif