test/nb_vol_conn.c
/*-------------------------------------------------------------------------
 * Function:    H5VL_nonblock_file_open
 *
 * Purpose:     Opens a container created with this connector
 *
 * Return:      Success:    Pointer to a file object
 *              Failure:    NULL
 *
 *-------------------------------------------------------------------------
 */
H5VL_nonblock_file_open
Purpose:     Opens a container created with this connector

Pointer to a file object
Failure:    NULL
H5VL_nonblock_file_open Purpose : Opens a container created with this connector Pointer to a file object Failure : NULL
static void *
H5VL_nonblock_file_open(const char *name, unsigned flags, hid_t fapl_id, hid_t dxpl_id, void **req)
{
    H5VL_nonblock_info_t *info;
    H5VL_nonblock_t *     file;
    hid_t                 under_fapl_id;
    void *                under;
#ifdef ENABLE_NONBLOCK_LOGGING
    printf("------- NON-BLOCKING VOL FILE Open\n");
#endif
    H5Pget_vol_info(fapl_id, (void **)&info);
    if (!info)
        return NULL;
    under_fapl_id = H5Pcopy(fapl_id);
    H5Pset_vol(under_fapl_id, info->under_vol_id, info->under_vol_info);
    under = H5VLfile_open(name, flags, under_fapl_id, dxpl_id, req);
    if (under) {
        file = H5VL_nonblock_new_obj(under, info->under_vol_id);
        if (req && *req)
            *req = H5VL_nonblock_new_obj(*req, info->under_vol_id);
    } 
    else
        file = NULL;
    H5Pclose(under_fapl_id);
    H5VL_nonblock_info_free(info);
    return (void *)file;
}
static void * H5VL_nonblock_file_open ( const char * name , unsigned flags , hid_t fapl_id , hid_t dxpl_id , void * * req ) { H5VL_nonblock_info_t * info ; H5VL_nonblock_t * file ; hid_t under_fapl_id ; void * under ; #ifdef ENABLE_NONBLOCK_LOGGING printf ( " \n " ) ; #endif H5Pget_vol_info ( fapl_id , ( void * * ) & info ) ; if ( ! info ) return NULL ; under_fapl_id = H5Pcopy ( fapl_id ) ; H5Pset_vol ( under_fapl_id , info -> under_vol_id , info -> under_vol_info ) ; under = H5VLfile_open ( name , flags , under_fapl_id , dxpl_id , req ) ; if ( under ) { file = H5VL_nonblock_new_obj ( under , info -> under_vol_id ) ; if ( req && * req ) * req = H5VL_nonblock_new_obj ( * req , info -> under_vol_id ) ; } else file = NULL ; H5Pclose ( under_fapl_id ) ; H5VL_nonblock_info_free ( info ) ; return ( void * ) file ; }
Function:    H5VL_nonblock_file_open
 Purpose:     Opens a container created with this connector
Function : H5VL_nonblock_file_open Purpose : Opens a container created with this connector
/* Get copy of our VOL info from FAPL */ /* Make sure we have info about the underlying VOL to be used */ /* Copy the FAPL */ /* Set the VOL ID and info for the underlying FAPL */ /* Open the file with the underlying VOL connector */ /* Check for async request */ /* end if */ /* Close underlying FAPL */ /* Release copy of our VOL info */