Commit 00f221ce authored by sof's avatar sof
Browse files

[project @ 2001-12-03 22:44:48 by sof]

Use the message queue friendly MsgWaitForMultipleObjects()
parent 1948094b
/* /*
* (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998
* *
* $Id: inputReady.c,v 1.10 2001/12/03 20:59:08 sof Exp $ * hWaitForInput Runtime Support
*
* hReady Runtime Support
*/ */
/* select and supporting types is not Posix */ /* select and supporting types is not Posix */
...@@ -51,8 +49,11 @@ inputReady(int fd, int msecs, int isSock) ...@@ -51,8 +49,11 @@ inputReady(int fd, int msecs, int isSock)
DWORD rc; DWORD rc;
HANDLE hFile = (HANDLE)_get_osfhandle(fd); HANDLE hFile = (HANDLE)_get_osfhandle(fd);
rc = WaitForSingleObject( hFile, rc = MsgWaitForMultipleObjects( 1,
msecs /*millisecs*/); &hFile,
FALSE, /* wait all */
msecs, /*millisecs*/
QS_ALLEVENTS);
/* 1 => Input ready, 0 => not ready, -1 => error */ /* 1 => Input ready, 0 => not ready, -1 => error */
switch (rc) { switch (rc) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment