summaryrefslogtreecommitdiffstats
path: root/src/H5FDcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDcore.c')
-rw-r--r--src/H5FDcore.c37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 0551dd0..2afe7ea 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, August 10, 1999
*
* Purpose: A driver which stores the HDF5 data in main memory using
@@ -144,8 +144,8 @@ static herr_t H5FD__core_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, ha
size_t size, const void *buf);
static herr_t H5FD__core_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__core_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
-static herr_t H5FD_core_lock(H5FD_t *_file, hbool_t rw);
-static herr_t H5FD_core_unlock(H5FD_t *_file);
+static herr_t H5FD__core_lock(H5FD_t *_file, hbool_t rw);
+static herr_t H5FD__core_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_core_g = {
"core", /* name */
@@ -177,8 +177,8 @@ static const H5FD_class_t H5FD_core_g = {
H5FD__core_write, /* write */
H5FD__core_flush, /* flush */
H5FD__core_truncate, /* truncate */
- H5FD_core_lock, /* lock */
- H5FD_core_unlock, /* unlock */
+ H5FD__core_lock, /* lock */
+ H5FD__core_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
@@ -345,7 +345,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
HDoff_t offset = (HDoff_t)addr; /* Offset to write at */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -414,7 +414,7 @@ H5FD__init_package(void)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
if(H5FD_core_init() < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize core VFD")
@@ -1581,7 +1581,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FD_core_lock
+ * Function: H5FD__core_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@@ -1595,13 +1595,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_core_lock(H5FD_t *_file, hbool_t rw)
+H5FD__core_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
@@ -1609,7 +1609,6 @@ H5FD_core_lock(H5FD_t *_file, hbool_t rw)
* descriptor, this is a no-op.
*/
if(file->fd >= 0) {
-
/* Set exclusive or shared lock based on rw status */
lock_flags = rw ? LOCK_EX : LOCK_SH;
@@ -1620,16 +1619,15 @@ H5FD_core_lock(H5FD_t *_file, hbool_t rw)
else
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to lock file")
} /* end if */
-
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_core_lock() */
+} /* end H5FD__core_lock() */
/*-------------------------------------------------------------------------
- * Function: H5FD_core_unlock
+ * Function: H5FD__core_unlock
*
* Purpose: To remove the existing lock on the file
*
@@ -1640,17 +1638,16 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_core_unlock(H5FD_t *_file)
+H5FD__core_unlock(H5FD_t *_file)
{
H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(file);
- if(file->fd >= 0) {
-
+ if(file->fd >= 0)
if(HDflock(file->fd, LOCK_UN) < 0) {
if(ENOSYS == errno)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "file locking disabled on this file system (use HDF5_USE_FILE_LOCKING environment variable to override)")
@@ -1658,9 +1655,7 @@ H5FD_core_unlock(H5FD_t *_file)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to unlock file")
} /* end if */
- } /* end if */
-
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FD_core_unlock() */
+} /* end H5FD__core_unlock() */