summaryrefslogtreecommitdiffstats
path: root/src/H5FSprivate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FSprivate.h')
-rw-r--r--src/H5FSprivate.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h
index ada35e0..25383cc 100644
--- a/src/H5FSprivate.h
+++ b/src/H5FSprivate.h
@@ -38,9 +38,13 @@
/* Library Private Macros */
/**************************/
+/* Flags for H5FS_section_class_t 'flags' field */
+#define H5FS_CLS_GHOST_OBJ 0x01 /* Objects in this class shouldn't be
+ * serialized to the file.
+ */
+
/* Flags for H5FS_add() */
#define H5FS_ADD_DESERIALIZING 0x01 /* Free space is being deserialized
- * (for package use only)
*/
#define H5FS_ADD_RETURNED_SPACE 0x02 /* Section was previously allocated
* and is being returned to the
@@ -49,6 +53,13 @@
* object)
*/
+/* Flags for deserialize callback */
+#define H5FS_DESERIALIZE_NO_ADD 0x01 /* Don't add section to free space
+ * manager after it's deserialized
+ * (its only here for it's side-
+ * effects).
+ */
+
/****************************/
/* Library Private Typedefs */
@@ -63,20 +74,24 @@ typedef struct H5FS_section_info_t H5FS_section_info_t;
/* Free space section class info */
typedef struct H5FS_section_class_t {
/* Class variables */
- const unsigned type; /* Type of free space section */
- size_t serial_size; /* Size of serialized form of section */
+ const unsigned type; /* Type of free space section */
+ size_t serial_size; /* Size of serialized form of section */
+ unsigned flags; /* Class flags */
+ void *cls_private; /* Class private information */
/* Class methods */
- herr_t (*init_cls)(struct H5FS_section_class_t *, const void *); /* Routine to initialize class-specific settings */
+ herr_t (*init_cls)(struct H5FS_section_class_t *, void *); /* Routine to initialize class-specific settings */
+ herr_t (*term_cls)(struct H5FS_section_class_t *); /* Routine to terminate class-specific settings */
/* Object methods */
- herr_t (*serialize)(const H5FS_section_info_t *, uint8_t *); /* Routine to serialize a "live" section into a buffer */
- H5FS_section_info_t *(*deserialize)(const uint8_t *, haddr_t, hsize_t); /* Routine to deserialize a buffer into a "live" section */
+ herr_t (*serialize)(const struct H5FS_section_class_t *, const H5FS_section_info_t *, uint8_t *); /* Routine to serialize a "live" section into a buffer */
+ H5FS_section_info_t *(*deserialize)(const struct H5FS_section_class_t *, hid_t dxpl_id, const uint8_t *, haddr_t, hsize_t, unsigned *); /* Routine to deserialize a buffer into a "live" section */
htri_t (*can_merge)(H5FS_section_info_t *, H5FS_section_info_t *, void *); /* Routine to determine if two nodes are mergable */
herr_t (*merge)(H5FS_section_info_t *, H5FS_section_info_t *, void *); /* Routine to merge two nodes */
htri_t (*can_shrink)(H5FS_section_info_t *, void *); /* Routine to determine if node can shrink container */
herr_t (*shrink)(H5FS_section_info_t **, void *); /* Routine to shrink container */
herr_t (*free)(H5FS_section_info_t *); /* Routine to free node */
+ herr_t (*valid)(const struct H5FS_section_class_t *, const H5FS_section_info_t *); /* Routine to check if a section is valid */
herr_t (*debug)(const H5FS_section_info_t *, FILE *, int , int ); /* Routine to dump debugging information about a section */
} H5FS_section_class_t;
@@ -127,15 +142,17 @@ H5FL_SEQ_EXTERN(H5FS_section_class_t);
/***************************************/
H5_DLL H5FS_t *H5FS_create(H5F_t *f, hid_t dxpl_id, haddr_t *fs_addr,
const H5FS_create_t *fs_create, size_t nclasses,
- const H5FS_section_class_t *classes[], const void *cls_init_udata);
+ const H5FS_section_class_t *classes[], void *cls_init_udata);
H5_DLL H5FS_t *H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr,
- size_t nclasses, const H5FS_section_class_t *classes[], const void *cls_init_udata);
+ size_t nclasses, const H5FS_section_class_t *classes[], void *cls_init_udata);
H5_DLL herr_t H5FS_add(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
H5FS_section_info_t *node, unsigned flags, void *op_data);
H5_DLL htri_t H5FS_find(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
hsize_t request, H5FS_section_info_t **node);
-H5_DLL herr_t H5FS_iterate(H5FS_t *fspace, H5FS_operator_t op, void *op_data);
+H5_DLL herr_t H5FS_iterate(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_operator_t op, void *op_data);
H5_DLL herr_t H5FS_get_sect_count(const H5FS_t *fspace, hsize_t *nsects);
+H5_DLL herr_t H5FS_sect_change_class(H5FS_t *fspace, H5FS_section_info_t *sect,
+ unsigned new_class);
H5_DLL herr_t H5FS_flush(H5F_t *f, hid_t dxpl_id, unsigned flags);
H5_DLL herr_t H5FS_delete(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr);
H5_DLL herr_t H5FS_close(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace);