summaryrefslogtreecommitdiffstats
path: root/src/H5Ipkg.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Ipkg.h')
-rw-r--r--src/H5Ipkg.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h
index 5461aa2..0a7215b 100644
--- a/src/H5Ipkg.h
+++ b/src/H5Ipkg.h
@@ -30,6 +30,7 @@
#include "H5Iprivate.h"
/* Other private headers needed by this file */
+#include "H5SLprivate.h" /* Skip Lists */
/**************************/
/* Package Private Macros */
@@ -60,10 +61,56 @@
/* Package Private Typedefs */
/****************************/
+/* ID information structure used */
+typedef struct H5I_id_info_t {
+ hid_t id; /* ID for this info */
+ unsigned count; /* Ref. count for this ID */
+ unsigned app_count; /* Ref. count of application visible IDs */
+ const void *object; /* Pointer associated with the ID */
+
+ /* Future ID info */
+ hbool_t is_future; /* Whether this ID represents a future object */
+ H5I_future_realize_func_t realize_cb; /* 'realize' callback for future object */
+ H5I_future_discard_func_t discard_cb; /* 'discard' callback for future object */
+} H5I_id_info_t;
+
+/* Type information structure used */
+typedef struct H5I_type_info_t {
+ const H5I_class_t *cls; /* Pointer to ID class */
+ unsigned init_count; /* # of times this type has been initialized */
+ uint64_t id_count; /* Current number of IDs held */
+ uint64_t nextid; /* ID to use for the next object */
+ H5I_id_info_t * last_id_info; /* Info for most recent ID looked up */
+ H5SL_t * ids; /* Pointer to skip list that stores IDs */
+} H5I_type_info_t;
+
+/*****************************/
+/* Package Private Variables */
+/*****************************/
+
+/* Array of pointers to ID types */
+H5_DLLVAR H5I_type_info_t *H5I_type_info_array_g[H5I_MAX_NUM_TYPES];
+
+/* Variable to keep track of the number of types allocated. Its value is the */
+/* next type ID to be handed out, so it is always one greater than the number */
+/* of types. */
+/* Starts at 1 instead of 0 because it makes trace output look nicer. If more */
+/* types (or IDs within a type) are needed, adjust TYPE_BITS in H5Ipkg.h */
+/* and/or increase size of hid_t */
+H5_DLLVAR int H5I_next_type_g;
+
/******************************/
/* Package Private Prototypes */
/******************************/
+H5_DLL hid_t H5I__register(H5I_type_t type, const void *object, hbool_t app_ref,
+ H5I_future_realize_func_t realize_cb, H5I_future_discard_func_t discard_cb);
+H5_DLL int H5I__destroy_type(H5I_type_t type);
+H5_DLL void *H5I__remove_verify(hid_t id, H5I_type_t type);
+H5_DLL int H5I__inc_type_ref(H5I_type_t type);
+H5_DLL int H5I__get_type_ref(H5I_type_t type);
+H5_DLL H5I_id_info_t *H5I__find_id(hid_t id);
+
/* Testing functions */
#ifdef H5I_TESTING
H5_DLL ssize_t H5I__get_name_test(hid_t id, char *name /*out*/, size_t size, hbool_t *cached);