コード例 #1
0
ファイル: cm_ep.c プロジェクト: LenaO/ucx
ucs_status_t uct_cm_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req)
{
    uct_cm_iface_t *iface = ucs_derived_of(tl_ep->iface, uct_cm_iface_t);
    uct_cm_ep_t *ep = ucs_derived_of(tl_ep, uct_cm_ep_t);

    UCS_ASYNC_BLOCK(iface->super.super.worker->async);
    ucs_derived_of(uct_pending_req_priv(req), uct_cm_pending_req_priv_t)->ep = ep;
    uct_pending_req_push(&iface->notify_q, req);
    UCS_ASYNC_UNBLOCK(iface->super.super.worker->async);
    return UCS_OK;
}
コード例 #2
0
ファイル: tcp_ep.c プロジェクト: ParaStation/psmpi2
ucs_status_t uct_tcp_ep_pending_add(uct_ep_h tl_ep, uct_pending_req_t *req)
{
    uct_tcp_ep_t *ep = ucs_derived_of(tl_ep, uct_tcp_ep_t);

    if (uct_tcp_ep_can_send(ep)) {
        return UCS_ERR_BUSY;
    }

    uct_pending_req_push(&ep->pending_q, req);
    return UCS_OK;
}