From 95009390426c2da2cfdaf91675ea486c8e8c4d4b Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sun, 31 Aug 2014 08:06:35 +0000 Subject: [PATCH] Fix abstraction violation This commit was SVN r32655. --- opal/mca/mpool/base/mpool_base_alloc.c | 18 ++++++++++++++++-- opal/mca/mpool/mpool.h | 4 ++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/opal/mca/mpool/base/mpool_base_alloc.c b/opal/mca/mpool/base/mpool_base_alloc.c index 0a3ca18895..af3196f98c 100644 --- a/opal/mca/mpool/base/mpool_base_alloc.c +++ b/opal/mca/mpool/base/mpool_base_alloc.c @@ -29,7 +29,21 @@ #include "base.h" #include "mpool_base_tree.h" #include "mpool_base_mem_cb.h" -#include "ompi/info/info.h" /* TODO */ +#include "opal/threads/mutex.h" + +struct opal_info_t { + opal_list_t super; + /**< generic list pointer which is the container for (key,value) + pairs */ + int i_f_to_c_index; + /**< fortran handle for info. This is needed for translation from + fortran to C and vice versa */ + opal_mutex_t *i_lock; + /**< Mutex for thread safety */ + bool i_freed; + /**< Whether this info has been freed or not */ +}; +typedef struct opal_info_t opal_info_t; /** * Memory Pool Registration @@ -95,7 +109,7 @@ static void unregister_tree_item(mca_mpool_base_tree_item_t *mpool_tree_item) * @retval pointer to the allocated memory * @retval NULL on failure */ -void *mca_mpool_base_alloc(size_t size, ompi_info_t *info) +void *mca_mpool_base_alloc(size_t size, opal_info_t *info) { opal_list_item_t * item; int num_modules = opal_list_get_size(&mca_mpool_base_modules); diff --git a/opal/mca/mpool/mpool.h b/opal/mca/mpool/mpool.h index 630ba3fdf0..f52d31f46e 100644 --- a/opal/mca/mpool/mpool.h +++ b/opal/mca/mpool/mpool.h @@ -38,7 +38,7 @@ #define MCA_MPOOL_FLAGS_SO_MEM 0x10 #define MCA_MPOOL_FLAGS_CUDA_REGISTER_MEM 0x20 -struct ompi_info_t; +struct opal_info_t; #define MCA_MPOOL_FLAGS_CUDA_GPU_MEM 0x40 @@ -225,7 +225,7 @@ typedef struct mca_mpool_base_module_t mca_mpool_base_module_t; * @retval pointer to the allocated memory * @retval NULL on failure */ -OPAL_DECLSPEC void * mca_mpool_base_alloc(size_t size, struct ompi_info_t * info); +OPAL_DECLSPEC void * mca_mpool_base_alloc(size_t size, struct opal_info_t * info); /** * Function to free memory previously allocated by mca_mpool_base_alloc