From 3a7163a8d2da71a3fbc75e9d2681006a967ec878 Mon Sep 17 00:00:00 2001 From: "Sameh S. Sharkawi" Date: Thu, 30 Jun 2016 11:11:53 -0400 Subject: [PATCH] pml/base: Expose some bsend varaibles so PMLs may reference them Signed-off-by: Joshua Hursey (cherry picked from commit 320ab3b84fd6661c91b16afa819263dc6bbc967e) Signed-off-by: Joshua Hursey --- ompi/mca/pml/base/pml_base_bsend.c | 7 ++++--- ompi/mca/pml/base/pml_base_bsend.h | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ompi/mca/pml/base/pml_base_bsend.c b/ompi/mca/pml/base/pml_base_bsend.c index d00620d6b14..951164ca084 100644 --- a/ompi/mca/pml/base/pml_base_bsend.c +++ b/ompi/mca/pml/base/pml_base_bsend.c @@ -12,6 +12,7 @@ * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -40,9 +41,9 @@ static opal_condition_t mca_pml_bsend_condition; /* condition variable to block static mca_allocator_base_component_t* mca_pml_bsend_allocator_component; static mca_allocator_base_module_t* mca_pml_bsend_allocator; /* sub-allocator to manage users buffer */ static size_t mca_pml_bsend_usersize; /* user provided buffer size */ -static unsigned char *mca_pml_bsend_userbase; /* user provided buffer base */ -static unsigned char *mca_pml_bsend_base; /* adjusted base of user buffer */ -static unsigned char *mca_pml_bsend_addr; /* current offset into user buffer */ +unsigned char *mca_pml_bsend_userbase = NULL; /* user provided buffer base */ +unsigned char *mca_pml_bsend_base = NULL; /* adjusted base of user buffer */ +unsigned char *mca_pml_bsend_addr = NULL; /* current offset into user buffer */ static size_t mca_pml_bsend_size; /* adjusted size of user buffer */ static size_t mca_pml_bsend_count; /* number of outstanding requests */ static size_t mca_pml_bsend_pagesz; /* mmap page size */ diff --git a/ompi/mca/pml/base/pml_base_bsend.h b/ompi/mca/pml/base/pml_base_bsend.h index cbeea6e2dde..7bdddb019b7 100644 --- a/ompi/mca/pml/base/pml_base_bsend.h +++ b/ompi/mca/pml/base/pml_base_bsend.h @@ -9,6 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. + * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -37,6 +38,10 @@ OMPI_DECLSPEC int mca_pml_base_bsend_request_fini(ompi_request_t*); OMPI_DECLSPEC void* mca_pml_base_bsend_request_alloc_buf( size_t length ); OMPI_DECLSPEC int mca_pml_base_bsend_request_free(void* addr); +extern unsigned char *mca_pml_bsend_userbase; /* user provided buffer base */ +extern unsigned char *mca_pml_bsend_base; /* adjusted base of user buffer */ +extern unsigned char *mca_pml_bsend_addr; /* current offset into user buffer */ + END_C_DECLS #endif