summaryrefslogtreecommitdiffstats
path: root/src/H5Fprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1997-10-08 22:11:46 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1997-10-08 22:11:46 (GMT)
commitcdb316b7e0b247977d667edac7b98486e3a9b46c (patch)
tree694437667c157739f46921fed4fd4df9975270cd /src/H5Fprivate.h
parent2721bb475869900135de0fe14cde6ac1d4d73d8d (diff)
downloadhdf5-cdb316b7e0b247977d667edac7b98486e3a9b46c.zip
hdf5-cdb316b7e0b247977d667edac7b98486e3a9b46c.tar.gz
hdf5-cdb316b7e0b247977d667edac7b98486e3a9b46c.tar.bz2
[svn-r117] Added "seek position caching" code to shared file-records, which trimmed 20%
off the run-time for the current tests. (4.77s down to 3.89s)
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r--src/H5Fprivate.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 4165b1e..81f43ce 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -351,11 +351,25 @@ typedef struct H5F_search_t {
ino_t ino; /* Unique file number on device */
} H5F_search_t;
+/* For determining what the last file operation was */
+typedef enum
+ {
+ OP_UNKNOWN = 0, /* Don't know what the last operation was (after fopen frex) */
+ OP_SEEK, /* Last operation was a seek */
+ OP_WRITE, /* Last operation was a write */
+ OP_READ /* Last operation was a read */
+ }
+H5F_fileop_t;
+
/*
* Define the structure to store the file information for HDF5 files. One of
* these structures is allocated per file, not per H5Fopen().
*/
typedef struct H5F_file_t {
+ /* Seek caching info */
+ haddr_t f_cur_off; /* Current location in the file */
+ H5F_fileop_t last_op; /* the last file operation performed */
+
H5F_search_t key; /* The key for looking up files */
uintn flags; /* Access Permissions for file */
hdf_file_t file_handle; /* File handle for actual I/O */