示例#1
0
static ssize_t psmx_sendv2(struct fid_ep *ep, const struct iovec *iov,
			   void **desc, size_t count, void *context)
{
	void *buf;
	size_t len;

	if (!iov || count > 1)
		return -EINVAL;

	if (count) {
		buf = iov[0].iov_base;
		len = iov[0].iov_len;
	}
	else {
		buf = NULL;
		len = 0;
	}

	return psmx_send2(ep, buf, len, desc ? desc[0] : NULL, context);
}
示例#2
0
static ssize_t psmx_sendv2(struct fid_ep *ep, const struct iovec *iov,
                           void **desc, size_t count, fi_addr_t dest_addr,
                           void *context)
{
    void *buf;
    size_t len;

    if (count && !iov)
        return -FI_EINVAL;

    if (count > 1) {
        return -FI_ENOSYS;
    } else if (count) {
        buf = iov[0].iov_base;
        len = iov[0].iov_len;
    } else {
        buf = NULL;
        len = 0;
    }

    return psmx_send2(ep, buf, len, desc ? desc[0] : NULL, dest_addr, context);
}