static bool input_available(void)
{
fd_set rfds;
- struct timeval tv = {0, 0};
int ret;
FD_ZERO(&rfds);
FD_SET(i9ep->ici->fds[0], &rfds);
- ret = para_select(1, &rfds, NULL, &tv);
+ ret = para_select(1, &rfds, NULL, 0);
return ret > 0;
}
* \param n \sa \ref para_select().
* \param readfds \sa \ref para_select().
* \param writefds \sa \ref para_select().
- * \param timeout_tv \sa \ref para_select().
+ * \param timeout \sa \ref para_select().
*
* \return \sa \ref para_select().
*
* The only difference between this function and \ref para_select() is that
* \ref i9e_select() returns zero if the select call returned \p EINTR.
*/
-int i9e_select(int n, fd_set *readfds, fd_set *writefds,
- struct timeval *timeout_tv)
+int i9e_select(int n, fd_set *readfds, fd_set *writefds, int timeout)
{
- int ret = select(n, readfds, writefds, NULL, timeout_tv);
+ struct timeval tv;
+ int ret;
+
+ ms2tv(timeout, &tv);
+ ret = select(n, readfds, writefds, NULL, &tv);
if (ret < 0) {
if (errno == EINTR)