diff options
| author | sof <unknown> | 2001-12-03 22:44:48 +0000 |
|---|---|---|
| committer | sof <unknown> | 2001-12-03 22:44:48 +0000 |
| commit | 00f221ce599e0273b315e70691e6877399a25848 (patch) | |
| tree | cf5fb89867804ec654f0da15b40d1e4091423053 | |
| parent | 1948094b82efa68b8aacad52b9b6322bc76f762a (diff) | |
| download | haskell-00f221ce599e0273b315e70691e6877399a25848.tar.gz | |
[project @ 2001-12-03 22:44:48 by sof]
Use the message queue friendly MsgWaitForMultipleObjects()
| -rw-r--r-- | ghc/lib/std/cbits/inputReady.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ghc/lib/std/cbits/inputReady.c b/ghc/lib/std/cbits/inputReady.c index bf86afb9a0..85b098ff82 100644 --- a/ghc/lib/std/cbits/inputReady.c +++ b/ghc/lib/std/cbits/inputReady.c @@ -1,9 +1,7 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: inputReady.c,v 1.10 2001/12/03 20:59:08 sof Exp $ - * - * hReady Runtime Support + * hWaitForInput Runtime Support */ /* select and supporting types is not Posix */ @@ -51,8 +49,11 @@ inputReady(int fd, int msecs, int isSock) DWORD rc; HANDLE hFile = (HANDLE)_get_osfhandle(fd); - rc = WaitForSingleObject( hFile, - msecs /*millisecs*/); + rc = MsgWaitForMultipleObjects( 1, + &hFile, + FALSE, /* wait all */ + msecs, /*millisecs*/ + QS_ALLEVENTS); /* 1 => Input ready, 0 => not ready, -1 => error */ switch (rc) { |
