Commit 9a48ceb5 authored by Norio Yamaguchi's avatar Norio Yamaguchi Committed by Pavan Balaji
Browse files

Add cancel_recv function

parent d50aaa1d
......@@ -16,6 +16,7 @@ lib_lib@MPILIBNAME@_la_SOURCES += \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_poll.c \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_send.c \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_probe.c \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_cancel.c \
$(EOA)
noinst_HEADERS += \
......
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/* vim: set ts=8 sts=4 sw=4 noexpandtab : */
/*
*
*/
#include "mpid_nem_impl.h"
#include "tofu_impl.h"
//#define MPID_NEM_TOFU_DEBUG_PROBE
#ifdef MPID_NEM_TOFU_DEBUG_PROBE
#define dprintf printf
#else
#define dprintf(...)
#endif
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_cancel_recv
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
/* returns zero in case request is canceled */
int MPID_nem_tofu_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *req)
{
int canceled;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TOFU_CANCEL_RECV);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TOFU_CANCEL_RECV);
/* returns zero in case request is canceled */
canceled = LLC_req_approve_recv((LLC_cmd_t *)REQ_FIELD(req, cmds));
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_TOFU_CANCEL_RECV);
return canceled;
fn_fail:
goto fn_exit;
}
......@@ -108,6 +108,7 @@ int MPID_nem_tofu_iprobe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm, i
int *flag, MPI_Status *status);
int MPID_nem_tofu_improbe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm, int context_offset,
int *flag, MPID_Request **message, MPI_Status *status);
int MPID_nem_tofu_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *req);
/*
* temporary llctofu api
......
......@@ -36,7 +36,7 @@ static MPIDI_Comm_ops_t comm_ops = {
.startall = NULL,
.cancel_send = NULL,
.cancel_recv = NULL,
.cancel_recv = MPID_nem_tofu_cancel_recv,
.probe = MPID_nem_tofu_probe,
.iprobe = MPID_nem_tofu_iprobe,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment