Lines Matching refs:to
7 * This code is derived from software contributed to Berkeley by
10 * By using this file, you agree to the terms and conditions set
18 ** Information local to this implementation of stdio,
108 # define FDSET_CAST /* empty cast for fd_set arg to select */
115 ** file descriptor (fd) if possible. The 'fd' is needed to possibly
116 ** switch the mode of the file (blocking/non-blocking) to match
119 ** in blocking mode. If there is to be a finite timeout then the file
121 ** written, select() can be used to test when something can be written
125 ** will not happen. This situation arises when a late-binding-to-disk
131 ** fd -- to become the file descriptor value from 'fp'
132 ** val -- the timeout value to be converted
140 ** The file mode may be changed to O_NONBLOCK or ~O_NONBLOCK
141 ** (meaning block). This is done to best match the type of
201 ** This #define uses a select() to wait for the 'fd' to become writable.
202 ** The select() can be active for up to 'to' time. The select may not
203 ** use all of the the 'to' time. Hence, the amount of "wall-clock" time is
204 ** measured to decide how much to subtract from 'to' to update it. On some
207 ** the updating of 'to' must be done ourselves; a copy of 'to' is passed
208 ** since a BSD-like system will have updated it and we don't want to
224 #define SM_IO_WR_TIMEOUT(fp, fd, to) { \
230 if ((to) == SM_TIME_DEFAULT) \
231 (to) = (fp)->f_timeout; \
232 if ((to) == SM_TIME_IMMEDIATE) \
237 else if ((to) == SM_TIME_FOREVER) \
244 sm_io_to.tv_sec = (to) / 1000; \
245 sm_io_to.tv_usec = ((to) - (sm_io_to.tv_sec * 1000)) * 1000; \
278 (to) -= (sm_io_to_diff.tv_sec * 1000); \
279 (to) -= (sm_io_to_diff.tv_usec / 1000); \
280 if ((to) < 0) \
281 (to) = 0; \
286 ** is SM_TIME_FOREVER then there is no need to do a timeout with
292 #define IS_IO_ERROR(fd, ret, to) \
295 (to) == SM_TIME_FOREVER)