From 404f8d107652627cfb045b5e10f173935a7cfd7f Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 21 Jan 2008 15:56:21 +0000 Subject: [PATCH] Nothing substantial: just move the generalized request intercept data structure up into the MPI::Grequest class (rather than being a struct definition outside of any class) to be similar to how the keyval intercept data structures are organized. Fix one minor compiler warning in the process. This commit was SVN r17171. --- ompi/mpi/cxx/intercepts.cc | 20 ++++++++++---------- ompi/mpi/cxx/request.h | 24 ++++++++++++------------ ompi/mpi/cxx/request_inln.h | 14 +++++++------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ompi/mpi/cxx/intercepts.cc b/ompi/mpi/cxx/intercepts.cc index ad78bca8a4..38b66490b0 100644 --- a/ompi/mpi/cxx/intercepts.cc +++ b/ompi/mpi/cxx/intercepts.cc @@ -495,11 +495,11 @@ ompi_mpi_cxx_win_delete_attr_intercept(MPI_Win win, int keyval, extern "C" int ompi_mpi_cxx_grequest_query_fn_intercept(void *state, MPI_Status *status) { - struct MPI::Grequest_intercept_t *data = - (struct MPI::Grequest_intercept_t *) state; + MPI::Grequest::Intercept_data_t *data = + (MPI::Grequest::Intercept_data_t *) state; MPI::Status s(*status); - int ret = data->git_cxx_query_fn(data->git_extra, s); + int ret = data->id_cxx_query_fn(data->id_extra, s); *status = s; return ret; } @@ -507,9 +507,9 @@ ompi_mpi_cxx_grequest_query_fn_intercept(void *state, MPI_Status *status) extern "C" int ompi_mpi_cxx_grequest_free_fn_intercept(void *state) { - struct MPI::Grequest_intercept_t *data = - (struct MPI::Grequest_intercept_t *) state; - int ret = data->git_cxx_free_fn(data->git_extra); + MPI::Grequest::Intercept_data_t *data = + (MPI::Grequest::Intercept_data_t *) state; + int ret = data->id_cxx_free_fn(data->id_extra); // Delete the struct that was "new"ed in MPI::Grequest::Start() delete data; return ret; @@ -518,8 +518,8 @@ ompi_mpi_cxx_grequest_free_fn_intercept(void *state) extern "C" int ompi_mpi_cxx_grequest_cancel_fn_intercept(void *state, int cancelled) { - struct MPI::Grequest_intercept_t *data = - (struct MPI::Grequest_intercept_t *) state; - return data->git_cxx_cancel_fn(data->git_extra, - (0 != cancelled ? true : false)); + MPI::Grequest::Intercept_data_t *data = + (MPI::Grequest::Intercept_data_t *) state; + return data->id_cxx_cancel_fn(data->id_extra, + (0 != cancelled ? true : false)); } diff --git a/ompi/mpi/cxx/request.h b/ompi/mpi/cxx/request.h index 51130c026b..10f14990b5 100644 --- a/ompi/mpi/cxx/request.h +++ b/ompi/mpi/cxx/request.h @@ -10,7 +10,7 @@ // University of Stuttgart. All rights reserved. // Copyright (c) 2004-2005 The Regents of the University of California. // All rights reserved. -// Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. +// Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved. // $COPYRIGHT$ // // Additional copyrights may follow @@ -220,16 +220,16 @@ class Grequest : public MPI::Request { Cancel_function *, void *); virtual void Complete(); -}; -// -// Type used for intercepting Generalized requests in the C++ layer so -// that the type can be converted to C++ types before invoking the -// user-specified C++ callbacks. -// -struct Grequest_intercept_t { - void *git_extra; - Grequest::Query_function *git_cxx_query_fn; - Grequest::Free_function *git_cxx_free_fn; - Grequest::Cancel_function *git_cxx_cancel_fn; + // + // Type used for intercepting Generalized requests in the C++ layer so + // that the type can be converted to C++ types before invoking the + // user-specified C++ callbacks. + // + struct Intercept_data_t { + void *id_extra; + Grequest::Query_function *id_cxx_query_fn; + Grequest::Free_function *id_cxx_free_fn; + Grequest::Cancel_function *id_cxx_cancel_fn; + }; }; diff --git a/ompi/mpi/cxx/request_inln.h b/ompi/mpi/cxx/request_inln.h index 7bfd6a95fa..68417b26a1 100644 --- a/ompi/mpi/cxx/request_inln.h +++ b/ompi/mpi/cxx/request_inln.h @@ -10,7 +10,7 @@ // University of Stuttgart. All rights reserved. // Copyright (c) 2004-2005 The Regents of the University of California. // All rights reserved. -// Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. +// Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved. // Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. // $COPYRIGHT$ // @@ -343,13 +343,13 @@ MPI::Grequest::Start(Query_function *query_fn, Free_function *free_fn, Cancel_function *cancel_fn, void *extra) { MPI_Request grequest = 0; - struct Grequest_intercept_t *new_extra = - new struct MPI::Grequest_intercept_t; + Intercept_data_t *new_extra = + new MPI::Grequest::Intercept_data_t; - new_extra->git_extra = extra; - new_extra->git_cxx_query_fn = query_fn; - new_extra->git_cxx_free_fn = free_fn; - new_extra->git_cxx_cancel_fn = cancel_fn; + new_extra->id_extra = extra; + new_extra->id_cxx_query_fn = query_fn; + new_extra->id_cxx_free_fn = free_fn; + new_extra->id_cxx_cancel_fn = cancel_fn; (void) MPI_Grequest_start(ompi_mpi_cxx_grequest_query_fn_intercept, ompi_mpi_cxx_grequest_free_fn_intercept, ompi_mpi_cxx_grequest_cancel_fn_intercept,