summaryrefslogtreecommitdiff
path: root/.topmsg
blob: 8cc3c36014c3d0fa07d4344d4e421116f03bb24d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
COMMITED UPSTREAM

From: Richard Braun <rbraun@sceen.net>
Subject: Fix timeout handling in _hurd_select
    
Rely on servers to implement timeouts, so that very short values (including
0) don't make mach_msg return before valid replies can be received. The
purpose of this scheme is to guarantee a full client-server round-trip,
whatever the timeout value.

This change depends on the new io_select_timeout RPC being implemented by
servers.

* hurd/Makefile (user-interfaces): Add io_reply and io_request.
* hurd/hurdselect.c: Include <sys/time.h>, <hurd/io_request.h> and <limits.h>.
(_hurd_select): Replace the call to __io_select with either __io_select_request
or __io_select_timeout_request, depending on the timeout. Count the number of
ready descriptors (replies for which at least one type bit is set). Implement
the timeout locally when there is no file descriptor.

TODO: see XXX