#include <elan3/epcomms.h>
EP_RCVR *ep_alloc_rcvr( | EP_SYS *sys, unsigned int service, unsigned int nenvs); |
A pointer to the Elan Kernel Comms subsystem private state. An EP_SYS pointer can be obtained by calling ep_system(3).
The number of the service with which the receiver will be associated. All service numbers are statically defined in <elan3/epcomms.h>.
The number of envelopes in the receive queue that can be outstanding while no receive buffer is queued. Note that there is a maximum value because of the implementation of the Elan allocator. If nenvs exceeds this value it will be truncated to the maximum value.
Installs a message receiver. A message receiver is not tied to any particular rail and may receive messages for this service on any rail for which receive buffers have been queued. If the receiver cannot be installed, either because it is already in use or because of resource allocation failure, then NULL will be returned.
If a receiver is successfully installed, a pointer to an EP_RCVR structure, which represents the new receiver, is returned. If the receiver cannot be installed then NULL is returned.
warning:
In future revisions of Elan Kernel Comms the return value in case of failure may be a pointer to be used as input to the ERR_PTR() macro.