root/ompi/mpi/tool/pvar_session_free.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. MPI_T_pvar_session_free

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
   4  *                         reserved.
   5  * Copyright (c) 2014 Cisco Systems, Inc.  All rights reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 
  13 #include "ompi/mpi/tool/mpit-internal.h"
  14 
  15 #if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
  16 #pragma weak MPI_T_pvar_session_free = PMPI_T_pvar_session_free
  17 #endif
  18 
  19 #if OMPI_PROFILING_DEFINES
  20 #include "ompi/mpi/tool/profile/defines.h"
  21 #endif
  22 
  23 
  24 int MPI_T_pvar_session_free(MPI_T_pvar_session *session)
  25 {
  26     int ret = MPI_SUCCESS;
  27 
  28     if (!mpit_is_initialized ()) {
  29         return MPI_T_ERR_NOT_INITIALIZED;
  30     }
  31 
  32     /* Check that this is a valid session */
  33     if (MPI_T_PVAR_SESSION_NULL == *session) {
  34         ret = MPI_T_ERR_INVALID_SESSION;
  35     } else {
  36         OBJ_RELEASE(*session);
  37         *session = MPI_T_PVAR_SESSION_NULL;
  38     }
  39 
  40     return ret;
  41 }

/* [<][>][^][v][top][bottom][index][help] */