root/ompi/mca/io/romio321/romio/adio/ad_pvfs/ad_pvfs_close.c

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

DEFINITIONS

This source file includes following definitions.
  1. ADIOI_PVFS_Close

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
   2 /* 
   3  *
   4  *   Copyright (C) 1997 University of Chicago. 
   5  *   See COPYRIGHT notice in top-level directory.
   6  */
   7 
   8 #include "ad_pvfs.h"
   9 
  10 void ADIOI_PVFS_Close(ADIO_File fd, int *error_code)
  11 {
  12     int err;
  13     static char myname[] = "ADIOI_PVFS_CLOSE";
  14 
  15 #ifdef ADIOI_MPE_LOGGING
  16     MPE_Log_event( ADIOI_MPE_close_a, 0, NULL );
  17 #endif
  18     err = pvfs_close(fd->fd_sys);
  19 #ifdef ADIOI_MPE_LOGGING
  20     MPE_Log_event( ADIOI_MPE_close_b, 0, NULL );
  21 #endif
  22     fd->fd_sys = -1;
  23 
  24     if (err == -1) {
  25         *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
  26                                            myname, __LINE__, MPI_ERR_IO,
  27                                            "**io",
  28                                            "**io %s", strerror(errno));
  29     }
  30     else *error_code = MPI_SUCCESS;
  31 }

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