IO_TIMEOUT_CTL(3D)
NAME
io_timeout_ctl − establish a time limit for I/O operations
SYNOPSIS
int io_timeout_ctl (eid, time);
int eid;
long time;
HP-UX COMPATIBILITY
Level: Device I/O Library − HP-UX/EXTENDED
Origin: HP
DESCRIPTION
Io_timeout_ctl enables you to assign a timeout value to the specified entity id. Eid is an entity identifier of an open HP-IB raw bus device file obtained from an open(2), dup(2), fcntl(2), or creat(2) call. open(2), dup(2), fcntl(2), or creat(2) call. Time is a 32-bit integer value specifying the length of the timeout in microseconds.
This timeout applies to future read and write requests on this entity id. If a read or write request does not complete within the specified time limit, the request is aborted and returns an error indication. The errno value for a timed-out request is EIO, specifying that a timeout has occurred.
Although the timeout value is specified in microseconds, the resolution of the timeout is system-dependent. For example, a particular system might have a resolution of 10 milliseconds, in which case the specified timeout value is rounded up to the next 10 msec boundary. A timeout value of zero means that the system never causes a timeout. When a file is opened, a zero timeout value is assigned by default.
Entity ids for the same device file obtained by separate open(2) requests have their own timeout values associated with them. Entity ids for the same device file obtained by dup(2) or inherited by a fork(2) request share the same timeout value. In the latter case, if one process changes the timeout, the new timeout is in effect for all such entity ids.
HARDWARE DEPENDENCIES
Series 500:
The timeout resolution is 10 msec. If an I/O operation is aborted due to a timeout, an errinfo(2) value of 56 is returned.
Series 200 and 300:
The default timeout for Series 200/300 is 15 seconds. Timeout resolution is 20 msec.
RETURN VALUE
Io_timeout_ctl returns 0 (zero) if successful, or −1 if an error was encountered.
DIAGNOSTICS
Io_timeout_ctl fails under the following circumstances, and sets errno (see errno(2)) to the value in square brackets:
eid does not refer to an open file [EBADF];
eid does not refer to a channel device file [ENOTTY].
Hewlett-Packard — last mod. May 11, 2021