summaryrefslogtreecommitdiffstats
path: root/src/H5Ipkg.h
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2004-06-18 16:56:04 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2004-06-18 16:56:04 (GMT)
commitf249eed71d4b646bc57a43f28e32f3c2d9d71050 (patch)
tree831e79372ff27e582d5a1022e189a71d192256eb /src/H5Ipkg.h
parenta83233a2c9f1fff24cffe02d4fa3fdaab3f92ff1 (diff)
downloadhdf5-f249eed71d4b646bc57a43f28e32f3c2d9d71050.zip
hdf5-f249eed71d4b646bc57a43f28e32f3c2d9d71050.tar.gz
hdf5-f249eed71d4b646bc57a43f28e32f3c2d9d71050.tar.bz2
[svn-r8707] Changed the way HDF5 handles hid_t's and added API functions to allow users to register IDs and ID types at runtime.
Diffstat (limited to 'src/H5Ipkg.h')
-rw-r--r--src/H5Ipkg.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/H5Ipkg.h b/src/H5Ipkg.h
index aab865c..d172f97 100644
--- a/src/H5Ipkg.h
+++ b/src/H5Ipkg.h
@@ -37,23 +37,25 @@
/**************************/
/*
- * Number of bits to use for Group ID in each atom. Increase if H5I_NGROUPS
- * becomes too large (an assertion would fail in H5I_init_interface). This is
- * the only number that must be changed since all other bit field sizes and
- * masks are calculated from GROUP_BITS.
+ * Number of bits to use for ID Type in each atom. Increase if more types
+ * are needed (though this will decrease the number of available IDs per
+ * type). This is the only number that must be changed since all other bit
+ * field sizes and masks are calculated from TYPE_BITS.
*/
-#define GROUP_BITS 5
-#define GROUP_MASK ((1<<GROUP_BITS)-1)
+#define TYPE_BITS 7
+#define TYPE_MASK ((1<<TYPE_BITS)-1)
+
+#define MAX_NUM_TYPES TYPE_MASK
/*
* Number of bits to use for the Atom index in each atom (assumes 8-bit
* bytes). We don't use the sign bit.
*/
-#define ID_BITS ((sizeof(hid_t)*8)-(GROUP_BITS+1))
+#define ID_BITS ((sizeof(hid_t)*8)-(TYPE_BITS+1))
#define ID_MASK ((1<<ID_BITS)-1)
-/* Map an atom to a Group number */
-#define H5I_GRP(a) ((H5I_type_t)(((hid_t)(a)>>ID_BITS) & GROUP_MASK))
+/* Map an atom to an ID type number */
+#define H5I_TYPE(a) ((H5I_type_t)(((hid_t)(a)>>ID_BITS) & TYPE_MASK))
/****************************/