From f2a30cde5d7a260f727bdf02abff40393207494c Mon Sep 17 00:00:00 2001 From: Rich Graham Date: Tue, 17 Jul 2007 21:26:56 +0000 Subject: [PATCH] add table of send completion callback functions, on a per send-type basis. This commit was SVN r15471. --- ompi/mca/pml/cm/pml_cm.h | 7 +++++++ ompi/mca/pml/cm/pml_cm_component.c | 12 ++++++++++++ ompi/mca/pml/pml.h | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ompi/mca/pml/cm/pml_cm.h b/ompi/mca/pml/cm/pml_cm.h index ade308b8c3..2b2ad16be6 100644 --- a/ompi/mca/pml/cm/pml_cm.h +++ b/ompi/mca/pml/cm/pml_cm.h @@ -32,6 +32,13 @@ OMPI_DECLSPEC extern mca_pml_base_component_1_0_0_t mca_pml_cm_component; struct mca_mtl_request_t; +/* Array of send completion callback - one per send type + * These are called internally by the library when the send + * is completed from its perspective. + */ +OMPI_DECLSPEC extern void (*send_completion_callbacks[]) + (struct mca_mtl_request_t *mtl_request); + struct ompi_pml_cm_t { mca_pml_base_module_t super; int free_list_num; diff --git a/ompi/mca/pml/cm/pml_cm_component.c b/ompi/mca/pml/cm/pml_cm_component.c index 0f54520ce5..6f1a6f88b7 100644 --- a/ompi/mca/pml/cm/pml_cm_component.c +++ b/ompi/mca/pml/cm/pml_cm_component.c @@ -64,6 +64,18 @@ mca_pml_base_component_1_0_0_t mca_pml_cm_component = { mca_pml_cm_component_fini /* component finalize */ }; +/* Array of send completion callback - one per send type + * These are called internally by the library when the send + * is completed from its perspective. + */ +void (*send_completion_callbacks[MCA_PML_BASE_SEND_SIZE]) + (struct mca_mtl_request_t *mtl_request) = + { mca_pml_cm_send_request_completion, + mca_pml_cm_send_request_completion, + mca_pml_cm_send_request_completion, + mca_pml_cm_send_request_completion, + mca_pml_cm_send_request_completion } ; + static int mca_pml_cm_component_open(void) { diff --git a/ompi/mca/pml/pml.h b/ompi/mca/pml/pml.h index f0b582bcf6..649d0312f3 100644 --- a/ompi/mca/pml/pml.h +++ b/ompi/mca/pml/pml.h @@ -110,7 +110,8 @@ typedef enum { MCA_PML_BASE_SEND_COMPLETE, MCA_PML_BASE_SEND_BUFFERED, MCA_PML_BASE_SEND_READY, - MCA_PML_BASE_SEND_STANDARD + MCA_PML_BASE_SEND_STANDARD, + MCA_PML_BASE_SEND_SIZE } mca_pml_base_send_mode_t; @@ -118,7 +119,6 @@ typedef enum { #define OMPI_ANY_SOURCE MPI_ANY_SOURCE #define OMPI_PROC_NULL MPI_PROC_NULL - /** * MCA->PML Called by MCA framework to initialize the component. *