flow_accept, flow_alloc, flow_dealloc - allocate and free resources to support Inter-Process Communication
int flow_accept(qosspec_t * qs, const struct timespec * timeo);
int flow_alloc(const char * dst_name, qosspec_t * qs, const struct timespec * timeo);
int flow_dealloc(int fd);
Compile and link with -louroboros-dev.
These calls are used to allocate and free system and network resources to support Inter-Process Communication (IPC). Such a collection of allocated system and network resources is referred to as a flow. A flow has a certain Quality of Service (QoS) associated with it.
The flow_accept() function blocks the calling thread waiting for an incoming request to allocate a flow. If qosspec_t * qs is not NULL, the value of qs will be updated to reflect the actual QoS provided by the IPC facility for the accepted flow. Which flows this process will accept is configured through the IRMd. For an explanation on configuring which flows an application should accept, see irm(8).
The flow_alloc() function requests to allocate system and/or network resources to support Inter-Process Communication between the calling application and one or more processes accepting flows for char * dst_name, which cannot be NULL. The flow_alloc() call can specify a certain minimum qosspec_t * qs that has to be guaranteed by the IPC facility allocating the resources. This can be NULL if there is no QoS to be guaranteed (best effort service). If qs is not NULL, the value of qs will be updated to reflect the actual QoS provided by the IPC facility.
The flow_accept() and flow_alloc() take a const struct timespec * timeo to specify a timeout. If timeo is NULL, the call will block indefinitely or until some error condition occurs.
The flow_dealloc() function will release any resources associated with the flow.
A qosspec_t specifies the following QoS characteristics of a flow:
TODO: specify a qosspec_t
On success, flow_accept() and flow_alloc() calls return a non-negative integer, referred to as a flow descriptor. On failure, a negative value indicating the error will be returned.
flow_accept(), flow_alloc() and flow_dealloc() can return the following errors:
-EINVAL An invalid argument was passed.
-EIRMD Failed to contact an IRMd instance.
flow_accept() and flow_alloc() can also return
-EBADF No more flow desciptors or flow_ids available.
-ENOMEM Not enough system memory resources available to allocate the flow.
-ETIMEDOUT Flow allocation timed out.
For an explanation of the terms used in this section, see attributes(7).
fccntl(3), flow_read(3), fqueue(3), fset(3), ouroboros(8)
These man pages are licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/