diff options
-rw-r--r-- | rts/win32/AsyncIO.c | 16 | ||||
-rw-r--r-- | rts/win32/AsyncIO.h | 8 | ||||
-rw-r--r-- | rts/win32/IOManager.c | 12 | ||||
-rw-r--r-- | rts/win32/IOManager.h | 18 |
4 files changed, 27 insertions, 27 deletions
diff --git a/rts/win32/AsyncIO.c b/rts/win32/AsyncIO.c index 6a05f680db..9e6594f601 100644 --- a/rts/win32/AsyncIO.c +++ b/rts/win32/AsyncIO.c @@ -40,8 +40,8 @@ typedef struct CompletedReq { unsigned int reqID; - int len; - int errCode; + HsInt len; + HsInt errCode; } CompletedReq; #define MAX_REQUESTS 200 @@ -58,9 +58,9 @@ static int issued_reqs; static void onIOComplete(unsigned int reqID, int fd STG_UNUSED, - int len, + HsInt len, void* buf STG_UNUSED, - int errCode) + HsInt errCode) { DWORD dwRes; /* Deposit result of request in queue/table..when there's room. */ @@ -106,9 +106,9 @@ onIOComplete(unsigned int reqID, unsigned int addIORequest(int fd, - int forWriting, - int isSock, - int len, + bool forWriting, + bool isSock, + HsInt len, char* buf) { EnterCriticalSection(&queue_lock); @@ -122,7 +122,7 @@ addIORequest(int fd, } unsigned int -addDelayRequest(int usecs) +addDelayRequest(HsInt usecs) { EnterCriticalSection(&queue_lock); issued_reqs++; diff --git a/rts/win32/AsyncIO.h b/rts/win32/AsyncIO.h index bedbf5b67b..3737db087a 100644 --- a/rts/win32/AsyncIO.h +++ b/rts/win32/AsyncIO.h @@ -10,11 +10,11 @@ extern unsigned int addIORequest(int fd, - int forWriting, - int isSock, - int len, + bool forWriting, + bool isSock, + HsInt len, char* buf); -extern unsigned int addDelayRequest(int usecs); +extern unsigned int addDelayRequest(HsInt usecs); extern unsigned int addDoProcRequest(void* proc, void* param); extern int startupAsyncIO(void); extern void shutdownAsyncIO(bool wait_threads); diff --git a/rts/win32/IOManager.c b/rts/win32/IOManager.c index f25b006c4d..c5cae75366 100644 --- a/rts/win32/IOManager.c +++ b/rts/win32/IOManager.c @@ -284,7 +284,7 @@ IOWorkerProc(PVOID param) } static -BOOL +bool NewIOWorkerThread(IOManagerState* iom) { unsigned threadId; @@ -296,7 +296,7 @@ NewIOWorkerThread(IOManagerState* iom) &threadId) ); } -BOOL +bool StartIOManager(void) { HANDLE hExit; @@ -429,9 +429,9 @@ depositWorkItem( unsigned int reqID, */ int AddIORequest ( int fd, - BOOL forWriting, - BOOL isSocket, - int len, + bool forWriting, + bool isSocket, + HsInt len, char* buffer, CompletionProc onCompletion) { @@ -461,7 +461,7 @@ AddIORequest ( int fd, * the request queue. */ BOOL -AddDelayRequest ( unsigned int usecs, +AddDelayRequest ( HsInt usecs, CompletionProc onCompletion) { WorkItem* wItem = (WorkItem*)malloc(sizeof(WorkItem)); diff --git a/rts/win32/IOManager.h b/rts/win32/IOManager.h index 94821a8475..01521ca8da 100644 --- a/rts/win32/IOManager.h +++ b/rts/win32/IOManager.h @@ -30,9 +30,9 @@ */ typedef void (*CompletionProc)(unsigned int requestID, int fd, - int len, + HsInt len, void* buf, - int errCode); + HsInt errCode); /* * Asynchronous procedure calls executed by a worker thread @@ -44,11 +44,11 @@ typedef int (*DoProcProc)(void *param); typedef union workData { struct { int fd; - int len; + HsInt len; char *buf; } ioData; struct { - int usecs; + HsInt usecs; } delayData; struct { DoProcProc proc; @@ -80,7 +80,7 @@ extern CompletionProc onComplete; /* * Starting up and shutting down. */ -extern BOOL StartIOManager ( void ); +extern bool StartIOManager ( void ); extern void ShutdownIOManager ( bool wait_threads ); /* @@ -88,13 +88,13 @@ extern void ShutdownIOManager ( bool wait_threads ); * completion routine is supplied, which the worker thread * will invoke upon completion. */ -extern int AddDelayRequest ( unsigned int usecs, +extern int AddDelayRequest ( HsInt usecs, CompletionProc onCompletion); extern int AddIORequest ( int fd, - BOOL forWriting, - BOOL isSocket, - int len, + bool forWriting, + bool isSocket, + HsInt len, char* buffer, CompletionProc onCompletion); |