diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-27 02:28:13 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-27 02:28:13 +0100 |
commit | 49683f5a992e6fd4bf5863aa581bc9f7796711f8 (patch) | |
tree | fb21125aaf3fa13558c646249ee400aee6cf0e62 /hurd | |
parent | 604efaa3acb8cec0c4f8014cfadffdb5481df8f3 (diff) |
Use struct timespec instead of time_data_t
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/hurdselect.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c index 58ded4e7a8..6c3eecdac5 100644 --- a/hurd/hurdselect.c +++ b/hurd/hurdselect.c @@ -53,7 +53,7 @@ _hurd_select (int nfds, int firstfd, lastfd; mach_msg_id_t reply_msgid; mach_msg_timeout_t to; - time_data_t td; + struct timespec ts; struct { struct hurd_userlink ulink; @@ -98,17 +98,17 @@ _hurd_select (int nfds, if (err) return -1; - td[0].sec = now.tv_sec + timeout->tv_sec; - td[0].nsec = now.tv_usec * 1000 + timeout->tv_nsec; + ts.tv_sec = now.tv_sec + timeout->tv_sec; + ts.tv_nsec = now.tv_usec * 1000 + timeout->tv_nsec; - if (td[0].nsec >= 1000000000) + if (ts.tv_nsec >= 1000000000) { - td[0].sec++; - td[0].nsec -= 1000000000; + ts.tv_sec++; + ts.tv_nsec -= 1000000000; } - if (td[0].sec < 0) - td[0].sec = LONG_MAX; /* XXX */ + if (ts.tv_sec < 0) + ts.tv_sec = LONG_MAX; /* XXX */ reply_msgid = IO_SELECT_TIMEOUT_REPLY_MSGID; } @@ -268,7 +268,7 @@ _hurd_select (int nfds, err = __io_select_request (d[i].io_port, d[i].reply_port, type); else err = __io_select_timeout_request (d[i].io_port, d[i].reply_port, - td, type); + ts, type); if (!err) { if (firstfd == lastfd) |