1
1

Make ompi_datatype_destroy a real function (instead of inline).

This commit was SVN r24462.
Этот коммит содержится в:
George Bosilca 2011-02-25 00:37:52 +00:00
родитель 4184baa67a
Коммит c66e454181
2 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright (c) 2009 The University of Tennessee and The University
* Copyright (c) 2009-2010 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
@ -159,18 +159,7 @@ ompi_datatype_commit( ompi_datatype_t ** type )
}
static inline int32_t
ompi_datatype_destroy( ompi_datatype_t** type)
{
ompi_datatype_t* pData = *type;
if( ompi_datatype_is_predefined(pData) && (pData->super.super.obj_reference_count <= 1) )
return OMPI_ERROR;
OBJ_RELEASE( pData );
*type = NULL;
return OMPI_SUCCESS;
}
OMPI_DECLSPEC int32_t ompi_datatype_destroy( ompi_datatype_t** type);
/*

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2009 The University of Tennessee and The University
* Copyright (c) 2004-2010 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -29,7 +29,6 @@
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/attribute/attribute.h"
static void __ompi_datatype_allocate( ompi_datatype_t* datatype )
{
datatype->args = NULL;
@ -76,3 +75,15 @@ ompi_datatype_t * ompi_datatype_create( int32_t expectedSize )
return datatype;
}
int32_t ompi_datatype_destroy( ompi_datatype_t** type)
{
ompi_datatype_t* pData = *type;
if( ompi_datatype_is_predefined(pData) && (pData->super.super.obj_reference_count <= 1) )
return OMPI_ERROR;
OBJ_RELEASE(pData);
*type = NULL;
return OMPI_SUCCESS;
}