From: Martin Quinson Date: Mon, 17 Apr 2017 07:27:33 +0000 (+0200) Subject: SMPI cleanups: rename a symbol and remove unused parameters X-Git-Tag: v3.16~341 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/25d1e57ecf83941d9ad4b361e16e6e354c87d585 SMPI cleanups: rename a symbol and remove unused parameters --- diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 1ff3398c74..47ac1b8642 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -897,9 +897,9 @@ XBT_PUBLIC(void) smpi_trace_set_call_location__(const char *file, int* line); XBT_PUBLIC(void *) smpi_shared_malloc(size_t size, const char *file, int line); #define SMPI_SHARED_MALLOC(size) smpi_shared_malloc(size, __FILE__, __LINE__) -XBT_PUBLIC(void *) smpi_shared_malloc_global__(size_t size, const char *file, int line, size_t *shared_block_offsets, int nb_shared_blocks); -#define SMPI_PARTIAL_SHARED_MALLOC(size, shared_block_offsets, nb_shared_blocks)\ - smpi_shared_malloc_global__(size, __FILE__, __LINE__, shared_block_offsets, nb_shared_blocks) +XBT_PUBLIC(void*) smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int nb_shared_blocks); +#define SMPI_PARTIAL_SHARED_MALLOC(size, shared_block_offsets, nb_shared_blocks) \ + smpi_shared_malloc_partial(size, shared_block_offsets, nb_shared_blocks) XBT_PUBLIC(void) smpi_shared_free(void *data); #define SMPI_SHARED_FREE(data) smpi_shared_free(data) diff --git a/src/smpi/smpi_shared.cpp b/src/smpi/smpi_shared.cpp index 8a113c3fa2..08fb31b56a 100644 --- a/src/smpi/smpi_shared.cpp +++ b/src/smpi/smpi_shared.cpp @@ -208,7 +208,8 @@ static void *smpi_shared_malloc_local(size_t size, const char *file, int line) #define ALIGN_UP(n, align) (((n) + (align)-1) & -(align)) #define ALIGN_DOWN(n, align) ((n) & -(align)) -void *smpi_shared_malloc_global__(size_t size, const char *file, int line, size_t *shared_block_offsets, int nb_shared_blocks) { +void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int nb_shared_blocks) +{ void *mem; xbt_assert(smpi_shared_malloc_blocksize % PAGE_SIZE == 0, "The block size of shared malloc should be a multiple of the page size."); /* First reserve memory area */ @@ -318,7 +319,7 @@ static void *smpi_shared_malloc_global(size_t size, const char *file, int line, shared_block_offsets[0] = 0; shared_block_offsets[1] = size; } - return smpi_shared_malloc_global__(size, file, line, shared_block_offsets, nb_shared_blocks); + return smpi_shared_malloc_partial(size, shared_block_offsets, nb_shared_blocks); } void *smpi_shared_malloc(size_t size, const char *file, int line) {