summaryrefslogtreecommitdiff
path: root/rts/win32
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-02-05 23:26:24 +0000
committerIan Lynagh <ian@well-typed.com>2013-02-05 23:26:24 +0000
commit073583173b42c988ef8af7f1a7a5f010645bbaef (patch)
tree44c6fd250abc5837e84536530c852399ac6daf4a /rts/win32
parentd8bd25c42a81c5a32ec02a6e24cbc9f01ab38c13 (diff)
downloadhaskell-073583173b42c988ef8af7f1a7a5f010645bbaef.tar.gz
Use usecs rather than msecs for microseconds
We were using "us" elsewhere, so this was inconsistent.
Diffstat (limited to 'rts/win32')
-rw-r--r--rts/win32/AsyncIO.c6
-rw-r--r--rts/win32/AsyncIO.h2
-rw-r--r--rts/win32/IOManager.c8
-rw-r--r--rts/win32/IOManager.h4
4 files changed, 10 insertions, 10 deletions
diff --git a/rts/win32/AsyncIO.c b/rts/win32/AsyncIO.c
index 979df0cb27..9f45317d38 100644
--- a/rts/win32/AsyncIO.c
+++ b/rts/win32/AsyncIO.c
@@ -118,15 +118,15 @@ addIORequest(int fd,
}
unsigned int
-addDelayRequest(int msecs)
+addDelayRequest(int usecs)
{
EnterCriticalSection(&queue_lock);
issued_reqs++;
LeaveCriticalSection(&queue_lock);
#if 0
- fprintf(stderr, "addDelayReq: %d\n", msecs); fflush(stderr);
+ fprintf(stderr, "addDelayReq: %d\n", usecs); fflush(stderr);
#endif
- return AddDelayRequest(msecs,onIOComplete);
+ return AddDelayRequest(usecs,onIOComplete);
}
unsigned int
diff --git a/rts/win32/AsyncIO.h b/rts/win32/AsyncIO.h
index 27669ce0b4..8d99c0acde 100644
--- a/rts/win32/AsyncIO.h
+++ b/rts/win32/AsyncIO.h
@@ -14,7 +14,7 @@ addIORequest(int fd,
int isSock,
int len,
char* buf);
-extern unsigned int addDelayRequest(int msecs);
+extern unsigned int addDelayRequest(int usecs);
extern unsigned int addDoProcRequest(void* proc, void* param);
extern int startupAsyncIO(void);
extern void shutdownAsyncIO(rtsBool wait_threads);
diff --git a/rts/win32/IOManager.c b/rts/win32/IOManager.c
index 13bdb6ff51..8490ed2dd7 100644
--- a/rts/win32/IOManager.c
+++ b/rts/win32/IOManager.c
@@ -199,8 +199,8 @@ IOWorkerProc(PVOID param)
*
* Note: Sleep() is in milliseconds, not micros.
*/
- Sleep((work->workData.delayData.msecs + 999) / 1000);
- len = work->workData.delayData.msecs;
+ Sleep((work->workData.delayData.usecs + 999) / 1000);
+ len = work->workData.delayData.usecs;
complData = NULL;
fd = 0;
errCode = 0;
@@ -409,7 +409,7 @@ AddIORequest ( int fd,
* the request queue.
*/
BOOL
-AddDelayRequest ( unsigned int msecs,
+AddDelayRequest ( unsigned int usecs,
CompletionProc onCompletion)
{
WorkItem* wItem = (WorkItem*)malloc(sizeof(WorkItem));
@@ -418,7 +418,7 @@ AddDelayRequest ( unsigned int msecs,
/* Fill in the blanks */
wItem->workKind = WORKER_DELAY;
- wItem->workData.delayData.msecs = msecs;
+ wItem->workData.delayData.usecs = usecs;
wItem->onCompletion = onCompletion;
wItem->requestID = reqID;
wItem->link = NULL;
diff --git a/rts/win32/IOManager.h b/rts/win32/IOManager.h
index 145a1e549b..866e950f4a 100644
--- a/rts/win32/IOManager.h
+++ b/rts/win32/IOManager.h
@@ -48,7 +48,7 @@ typedef union workData {
char *buf;
} ioData;
struct {
- int msecs;
+ int usecs;
} delayData;
struct {
DoProcProc proc;
@@ -88,7 +88,7 @@ extern void ShutdownIOManager ( rtsBool wait_threads );
* completion routine is supplied, which the worker thread
* will invoke upon completion.
*/
-extern int AddDelayRequest ( unsigned int msecs,
+extern int AddDelayRequest ( unsigned int usecs,
CompletionProc onCompletion);
extern int AddIORequest ( int fd,