Lines Matching defs: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
20 ** Information local to this implementation of stdio,
110 # define FDSET_CAST /* empty cast for fd_set arg to select */
117 ** file descriptor (fd) if possible. The 'fd' is needed to possibly
118 ** switch the mode of the file (blocking/non-blocking) to match
121 ** in blocking mode. If there is to be a finite timeout then the file
123 ** written, select() can be used to test when something can be written
127 ** will not happen. This situation arises when a late-binding-to-disk
133 ** fd -- to become the file descriptor value from 'fp'
134 ** val -- the timeout value to be converted
142 ** The file mode may be changed to O_NONBLOCK or ~O_NONBLOCK
143 ** (meaning block). This is done to best match the type of
203 ** This #define uses a select() to wait for the 'fd' to become writable.
204 ** The select() can be active for up to 'to' time. The select may not
205 ** use all of the the 'to' time. Hence, the amount of "wall-clock" time is
206 ** measured to decide how much to subtract from 'to' to update it. On some
209 ** the updating of 'to' must be done ourselves; a copy of 'to' is passed
210 ** since a BSD-like system will have updated it and we don't want to
226 #define SM_IO_WR_TIMEOUT(fp, fd, to) { \
232 if ((to) == SM_TIME_DEFAULT) \
233 (to) = (fp)->f_timeout; \
234 if ((to) == SM_TIME_IMMEDIATE) \
239 else if ((to) == SM_TIME_FOREVER) \
246 sm_io_to.tv_sec = (to) / 1000; \
247 sm_io_to.tv_usec = ((to) - (sm_io_to.tv_sec * 1000)) * 1000; \
280 (to) -= (sm_io_to_diff.tv_sec * 1000); \
281 (to) -= (sm_io_to_diff.tv_usec / 1000); \
282 if ((to) < 0) \
283 (to) = 0; \
288 ** is SM_TIME_FOREVER then there is no need to do a timeout with
294 #define IS_IO_ERROR(fd, ret, to) \
297 (to) == SM_TIME_FOREVER)