2005-06-27 23:24:04 +04:00
|
|
|
/*
|
2006-07-04 05:20:20 +04:00
|
|
|
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2006-07-04 05:20:20 +04:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-06-27 23:24:04 +04:00
|
|
|
* University of Stuttgart. All rights reserved.
|
2006-07-04 05:20:20 +04:00
|
|
|
* Copyright (c) 2004-2006 The Regents of the University of California.
|
2005-06-27 23:24:04 +04:00
|
|
|
* All rights reserved.
|
|
|
|
* $COPYRIGHT$
|
2006-07-04 05:20:20 +04:00
|
|
|
*
|
2005-06-27 23:24:04 +04:00
|
|
|
* Additional copyrights may follow
|
2006-07-04 05:20:20 +04:00
|
|
|
*
|
2005-06-27 23:24:04 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2006-07-04 05:20:20 +04:00
|
|
|
#include "ompi_config.h"
|
2006-08-16 01:59:37 +04:00
|
|
|
|
2006-07-04 05:20:20 +04:00
|
|
|
#include "ompi/request/request.h"
|
2006-08-16 01:59:37 +04:00
|
|
|
|
2006-07-04 05:20:20 +04:00
|
|
|
#include "mtl_mx.h"
|
2006-08-16 01:59:37 +04:00
|
|
|
#include "mtl_mx_types.h"
|
|
|
|
#include "mtl_mx_request.h"
|
|
|
|
|
|
|
|
int
|
|
|
|
ompi_mtl_mx_cancel(struct mca_mtl_base_module_t* mtl,
|
|
|
|
struct mca_mtl_request_t *mtl_request,
|
|
|
|
int flag)
|
|
|
|
{
|
|
|
|
mca_mtl_mx_request_t *mtl_mx_request =
|
|
|
|
(mca_mtl_mx_request_t*) mtl_request;
|
|
|
|
uint32_t result;
|
2005-06-27 23:24:04 +04:00
|
|
|
|
2006-08-16 01:59:37 +04:00
|
|
|
mx_cancel(ompi_mtl_mx.mx_endpoint,
|
|
|
|
&mtl_mx_request->mx_request,
|
|
|
|
&result);
|
2005-06-27 23:24:04 +04:00
|
|
|
|
2006-08-16 01:59:37 +04:00
|
|
|
/* If MX canceled the request, mark it as canceled and complete
|
|
|
|
it. Otherwise, keep on going */
|
|
|
|
if (result) {
|
|
|
|
mtl_request->ompi_req->req_status._cancelled = true;
|
|
|
|
mtl_mx_request->super.completion_callback(&mtl_mx_request->super);
|
|
|
|
}
|
2005-06-27 23:24:04 +04:00
|
|
|
|
2006-08-16 01:59:37 +04:00
|
|
|
return OMPI_SUCCESS;
|
2006-07-04 05:20:20 +04:00
|
|
|
}
|