grio_bind(3x)
grio_bind - bind an open file descriptor to a GRIO stream
Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.30.
This page could not be fully tidied (no-header); it is shown as printed.
NAME grio_bind - bind an open file descriptor to a GRIO stream C SYNOPSIS #include <grio2.h> int grio_bind(grio_descriptor_t fd, grio_stream_id_t *stream_id); cc ... -lgrio2 PARAMETERS fd An open file descriptor. stream_id The stream ID of an active GRIO stream. DESCRIPTION grio_bind binds an open file descriptor to a GRIO stream. Once bound, all I/O to or from the file descriptor will receive the Quality-of-Service (QoS) guarantees of the stream. Multiple file descriptors may be bound to the same stream, in which case the guarantees of the stream apply to the aggregate of the I/O to or from all of the file descriptors. GRIO schedules I/O from multiple file descriptors to the same stream in FIFO order. Binding a file descriptor increments the reference count of a stream by 1. The file descriptor remains bound to the stream until it is either closed or explicitly unbound with grio_unbind(3X). The file descriptor must be capable of GRIO I/O. That is, it must refer to an open file on an XFS or CXFS filesystem and be configured for direct I/O. DIAGNOSTICS On success, 0 is returned and the file descriptor is bound to the stream. Subsequent I/O will receive the QoS guarantees of the stream. If the file descriptor can't be bound, -1 is returned and errno is set to indicate the error. The following error codes are defined: EBADF Bad file descriptor. EIO The library could not communicate with ggd2. ENOENT The specified stream does not exist. EPERM The process does not have root permissions or CAP_DEVICE_MGMT privilege. FILES /etc/griotab SEE ALSO grio2(5), grio_avail(3X), grio_get_stream(3X), grio_modify(3X), grio_release(3X), grio_reserve(3X), grio_unbind(3X)