NAMEgrio_release - release bandwidth to GRIO
C SYNOPSIS
#include <grio2.h>
int grio_release(grio_stream_id_t *stream_id)
cc ... -lgrio2
PARAMETERS
stream_id The ID of the stream to be released.
DESCRIPTIONgrio_release removes a GRIO stream ID from the system and releases the
primary reference taken when it was created. When all remaining
references to the stream are removed the stream will be destroyed and its
associated bandwidth returned to the system.
grio_release hides the stream. Attempts to bind new file descriptors
using grio_bind(3X) will fail with ENOENT. However, the Quality-of-
Service (QoS) guarantees of the stream will remain in effect until all
remaining bound file descriptors are either unbound or closed, and any in
flight I/O to the stream completes.
This behaviour gives an application some flexibility in controlling the
extent of a GRIO guarantee. For instance, by binding a file descriptor to
a stream and immediately releasing the stream an application can create a
temporary reservation which persists for as long as the file descriptor
remains open. Alternatively, if a process does not explicitly release a
stream, the guarantee persists until that process exits. See the GRIO
Version 2 Guide for more information.
DIAGNOSTICS
On success, 0 is returned indicating that stream has been released. If
the stream does not exist -1 is returned and errno is set to indicate the
error. The following error codes are defined:
EIO The library could not communicate with ggd2.
ENOENT The stream does not exist.
EPERM The process does not have root permissions or CAP_DEVICE_MGMT
privilege.
FILES
/etc/griotab
SEE ALSOgrio2(5), grio_avail(3X), grio_bind(3X), grio_get_stream(3X),
grio_modify(3X), grio_reserve(3X), grio_unbind(3X)
Page 1