2003-02-17 23:54:15 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2007-02-07 22:56:24 +08:00
|
|
|
* Copyright by The HDF Group. *
|
2003-02-17 23:54:15 +08:00
|
|
|
* Copyright by the Board of Trustees of the University of Illinois. *
|
|
|
|
* All rights reserved. *
|
|
|
|
* *
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
|
|
|
* the files COPYING and Copyright.html. COPYING can be found at the root *
|
|
|
|
* of the source code distribution tree; Copyright.html can be found at the *
|
|
|
|
* root level of an installed copy of the electronic HDF5 document set and *
|
|
|
|
* is linked from the top-level documents page. It can also be found at *
|
2007-02-07 22:56:24 +08:00
|
|
|
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
|
|
|
|
* access to either file, you may request a copy from help@hdfgroup.org. *
|
2003-02-17 23:54:15 +08:00
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
|
|
|
#ifndef H5O_PACKAGE
|
|
|
|
#error "Do not include this file outside the H5O package!"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _H5Opkg_H
|
|
|
|
#define _H5Opkg_H
|
|
|
|
|
2005-11-07 11:13:53 +08:00
|
|
|
/* Get package's private header */
|
|
|
|
#include "H5Oprivate.h" /* Object headers */
|
|
|
|
|
|
|
|
/* Other private headers needed by this file */
|
2005-11-15 10:55:39 +08:00
|
|
|
#include "H5ACprivate.h" /* Metadata cache */
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2006-10-16 22:46:00 +08:00
|
|
|
/* Object header macros */
|
|
|
|
#define H5O_NMESGS 8 /*initial number of messages */
|
|
|
|
#define H5O_NCHUNKS 2 /*initial number of chunks */
|
2007-03-12 07:15:03 +08:00
|
|
|
#define H5O_MIN_SIZE 22 /* Min. obj header data size (must be big enough for a message prefix and a continuation message) */
|
2007-05-02 05:00:52 +08:00
|
|
|
#define H5O_MSG_TYPES 24 /* # of types of messages */
|
2007-01-19 22:54:46 +08:00
|
|
|
#define H5O_MAX_CRT_ORDER_IDX 65535 /* Max. creation order index value */
|
2006-10-16 22:46:00 +08:00
|
|
|
|
|
|
|
/* Versions of object header structure */
|
|
|
|
|
|
|
|
/* Initial version of the object header format */
|
|
|
|
#define H5O_VERSION_1 1
|
|
|
|
|
|
|
|
/* Revised version - leaves out reserved bytes and alignment padding, and adds
|
2007-03-04 12:28:09 +08:00
|
|
|
* magic number as prefix and checksum as suffix for all chunks.
|
2006-10-16 22:46:00 +08:00
|
|
|
*/
|
|
|
|
#define H5O_VERSION_2 2
|
|
|
|
|
2008-09-16 23:52:51 +08:00
|
|
|
/* The latest version of the format. Look through the 'flush'
|
2006-10-16 22:46:00 +08:00
|
|
|
* and 'size' callback for places to change when updating this. */
|
2006-10-23 18:15:52 +08:00
|
|
|
#define H5O_VERSION_LATEST H5O_VERSION_2
|
2006-10-16 22:46:00 +08:00
|
|
|
|
2003-02-17 23:54:15 +08:00
|
|
|
/*
|
|
|
|
* Align messages on 8-byte boundaries because we would like to copy the
|
|
|
|
* object header chunks directly into memory and operate on them there, even
|
|
|
|
* on 64-bit architectures. This allows us to reduce the number of disk I/O
|
|
|
|
* requests with a minimum amount of mem-to-mem copies.
|
2006-10-17 07:04:45 +08:00
|
|
|
*
|
|
|
|
* Note: We no longer attempt to do this. - QAK, 10/16/06
|
2003-02-17 23:54:15 +08:00
|
|
|
*/
|
2006-10-16 22:46:00 +08:00
|
|
|
#define H5O_ALIGN_OLD(X) (8 * (((X) + 7) / 8))
|
|
|
|
#define H5O_ALIGN_VERS(V, X) \
|
2007-01-19 22:54:46 +08:00
|
|
|
(((V) == H5O_VERSION_1) ? \
|
2006-10-16 22:46:00 +08:00
|
|
|
H5O_ALIGN_OLD(X) \
|
|
|
|
: \
|
|
|
|
(X) \
|
|
|
|
)
|
|
|
|
#define H5O_ALIGN_OH(O, X) \
|
|
|
|
H5O_ALIGN_VERS((O)->version, X)
|
|
|
|
#define H5O_ALIGN_F(F, X) \
|
|
|
|
H5O_ALIGN_VERS((H5F_USE_LATEST_FORMAT(F) ? H5O_VERSION_LATEST : H5O_VERSION_1), X)
|
2006-10-17 07:04:45 +08:00
|
|
|
|
|
|
|
/* Size of checksum (on disk) */
|
|
|
|
#define H5O_SIZEOF_CHKSUM 4
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2007-03-07 02:54:24 +08:00
|
|
|
/* ========= Object Creation properties ============ */
|
|
|
|
/* Default values for some of the object creation properties */
|
|
|
|
/* NOTE: The H5O_CRT_ATTR_MAX_COMPACT_DEF & H5O_CRT_ATTR_MIN_DENSE_DEF values
|
|
|
|
* are "built into" the file format, make certain existing files with
|
|
|
|
* default attribute phase change storage are handled correctly if they
|
|
|
|
* are changed.
|
|
|
|
*/
|
|
|
|
#define H5O_CRT_ATTR_MAX_COMPACT_DEF 8
|
|
|
|
#define H5O_CRT_ATTR_MIN_DENSE_DEF 6
|
2007-03-04 12:28:09 +08:00
|
|
|
#define H5O_CRT_OHDR_FLAGS_DEF H5O_HDR_STORE_TIMES
|
|
|
|
|
2007-03-11 04:02:55 +08:00
|
|
|
/* Object header status flag definitions */
|
2007-03-11 11:06:05 +08:00
|
|
|
#define H5O_HDR_CHUNK0_1 0x00 /* Use 1-byte value for chunk #0 size */
|
|
|
|
#define H5O_HDR_CHUNK0_2 0x01 /* Use 2-byte value for chunk #0 size */
|
|
|
|
#define H5O_HDR_CHUNK0_4 0x02 /* Use 4-byte value for chunk #0 size */
|
|
|
|
#define H5O_HDR_CHUNK0_8 0x03 /* Use 8-byte value for chunk #0 size */
|
2007-03-11 04:02:55 +08:00
|
|
|
|
2003-02-17 23:54:15 +08:00
|
|
|
/*
|
2006-10-16 22:46:00 +08:00
|
|
|
* Size of object header prefix.
|
2003-02-17 23:54:15 +08:00
|
|
|
*/
|
2007-01-19 22:54:46 +08:00
|
|
|
#define H5O_SIZEOF_HDR(O) \
|
|
|
|
(((O)->version == H5O_VERSION_1) \
|
|
|
|
? \
|
|
|
|
H5O_ALIGN_OLD(1 + /*version number */ \
|
|
|
|
1 + /*reserved */ \
|
|
|
|
2 + /*number of messages */ \
|
|
|
|
4 + /*reference count */ \
|
|
|
|
4) /*chunk data size */ \
|
2006-10-16 22:46:00 +08:00
|
|
|
: \
|
[svn-r15676] Description:
Centralize all macros for declaring "magic numbers"/signatures for
objects in the file into src/H5Fprivate.h, so it's easier to know what values
have already been defined, etc.
Tested on:
Mac OS X/32 10.5.4 (amazon) in debug mode
Mac OS X/32 10.5.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-09-23 01:13:21 +08:00
|
|
|
(H5_SIZEOF_MAGIC + /*magic number */ \
|
2007-01-19 22:54:46 +08:00
|
|
|
1 + /*version number */ \
|
|
|
|
1 + /*flags */ \
|
2007-03-04 12:28:09 +08:00
|
|
|
(((O)->flags & H5O_HDR_STORE_TIMES) ? ( \
|
|
|
|
4 + /*access time */ \
|
|
|
|
4 + /*modification time */ \
|
|
|
|
4 + /*change time */ \
|
|
|
|
4 /*birth time */ \
|
|
|
|
) : 0) + \
|
2007-03-07 02:54:24 +08:00
|
|
|
(((O)->flags & H5O_HDR_ATTR_STORE_PHASE_CHANGE) ? ( \
|
|
|
|
2 + /*max compact attributes */ \
|
|
|
|
2 /*min dense attributes */ \
|
|
|
|
) : 0) + \
|
2007-03-11 04:02:55 +08:00
|
|
|
(1 << ((O)->flags & H5O_HDR_CHUNK0_SIZE)) + /*chunk 0 data size */ \
|
2007-02-07 10:18:17 +08:00
|
|
|
H5O_SIZEOF_CHKSUM) /*checksum size */ \
|
2006-10-16 22:46:00 +08:00
|
|
|
)
|
2003-02-17 23:54:15 +08:00
|
|
|
|
|
|
|
/*
|
2006-10-16 22:46:00 +08:00
|
|
|
* Size of object header message prefix
|
2003-02-17 23:54:15 +08:00
|
|
|
*/
|
2007-03-09 04:10:12 +08:00
|
|
|
#define H5O_SIZEOF_MSGHDR_VERS(V,C) \
|
2007-01-19 22:54:46 +08:00
|
|
|
(((V) == H5O_VERSION_1) \
|
|
|
|
? \
|
|
|
|
H5O_ALIGN_OLD(2 + /*message type */ \
|
|
|
|
2 + /*sizeof message data */ \
|
|
|
|
1 + /*flags */ \
|
|
|
|
3) /*reserved */ \
|
2006-10-16 22:46:00 +08:00
|
|
|
: \
|
2007-01-19 22:54:46 +08:00
|
|
|
(1 + /*message type */ \
|
|
|
|
2 + /*sizeof message data */ \
|
|
|
|
1 + /*flags */ \
|
2007-03-09 04:10:12 +08:00
|
|
|
((C) ? ( \
|
|
|
|
2 /*creation index */ \
|
|
|
|
) : 0)) \
|
2006-10-16 22:46:00 +08:00
|
|
|
)
|
|
|
|
#define H5O_SIZEOF_MSGHDR_OH(O) \
|
2007-03-09 04:10:12 +08:00
|
|
|
H5O_SIZEOF_MSGHDR_VERS((O)->version, (O)->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
|
|
|
|
#define H5O_SIZEOF_MSGHDR_F(F, C) \
|
|
|
|
H5O_SIZEOF_MSGHDR_VERS((H5F_USE_LATEST_FORMAT(F) || H5F_STORE_MSG_CRT_IDX(F)) ? H5O_VERSION_LATEST : H5O_VERSION_1, (C))
|
2006-10-17 07:04:45 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Size of chunk "header" for each chunk
|
|
|
|
*/
|
|
|
|
#define H5O_SIZEOF_CHKHDR_VERS(V) \
|
2007-01-19 22:54:46 +08:00
|
|
|
(((V) == H5O_VERSION_1) \
|
|
|
|
? \
|
|
|
|
0 + /*no magic # */ \
|
|
|
|
0 /*no checksum */ \
|
2006-10-17 07:04:45 +08:00
|
|
|
: \
|
[svn-r15676] Description:
Centralize all macros for declaring "magic numbers"/signatures for
objects in the file into src/H5Fprivate.h, so it's easier to know what values
have already been defined, etc.
Tested on:
Mac OS X/32 10.5.4 (amazon) in debug mode
Mac OS X/32 10.5.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
2008-09-23 01:13:21 +08:00
|
|
|
H5_SIZEOF_MAGIC + /*magic # */ \
|
2007-01-19 22:54:46 +08:00
|
|
|
H5O_SIZEOF_CHKSUM /*checksum */ \
|
2006-10-17 07:04:45 +08:00
|
|
|
)
|
|
|
|
#define H5O_SIZEOF_CHKHDR_OH(O) \
|
2007-01-19 22:54:46 +08:00
|
|
|
H5O_SIZEOF_CHKHDR_VERS((O)->version)
|
2006-10-17 07:04:45 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Size of checksum for each chunk
|
|
|
|
*/
|
|
|
|
#define H5O_SIZEOF_CHKSUM_VERS(V) \
|
2007-01-19 22:54:46 +08:00
|
|
|
(((V) == H5O_VERSION_1) \
|
|
|
|
? \
|
|
|
|
0 /*no checksum */ \
|
2006-10-17 07:04:45 +08:00
|
|
|
: \
|
2007-01-19 22:54:46 +08:00
|
|
|
H5O_SIZEOF_CHKSUM /*checksum */ \
|
2006-10-17 07:04:45 +08:00
|
|
|
)
|
|
|
|
#define H5O_SIZEOF_CHKSUM_OH(O) \
|
2007-01-19 22:54:46 +08:00
|
|
|
H5O_SIZEOF_CHKSUM_VERS((O)->version)
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2008-08-11 23:16:34 +08:00
|
|
|
/* Input/output flags for decode functions */
|
|
|
|
#define H5O_DECODEIO_NOCHANGE 0x01u /* IN: do not modify values */
|
|
|
|
#define H5O_DECODEIO_DIRTY 0x02u /* OUT: message has been changed */
|
|
|
|
|
2009-01-30 04:43:16 +08:00
|
|
|
/* Macro to incremend ndecode_dirtied (only if we are debugging) */
|
|
|
|
#ifndef NDEBUG
|
|
|
|
#define INCR_NDECODE_DIRTIED(OH) (OH)->ndecode_dirtied++;
|
|
|
|
#else /* NDEBUG */
|
|
|
|
#define INCR_NDECODE_DIRTIED(OH) ;
|
|
|
|
#endif /* NDEBUG */
|
|
|
|
|
2007-02-04 15:37:15 +08:00
|
|
|
/* Load native information for a message, if it's not already present */
|
|
|
|
/* (Only works for messages with decode callback) */
|
2008-08-11 23:16:34 +08:00
|
|
|
#define H5O_LOAD_NATIVE(F, DXPL, IOF, OH, MSG, ERR) \
|
2007-02-04 15:37:15 +08:00
|
|
|
if(NULL == (MSG)->native) { \
|
2007-02-06 06:26:44 +08:00
|
|
|
const H5O_msg_class_t *msg_type = (MSG)->type; \
|
2008-08-11 23:16:34 +08:00
|
|
|
unsigned ioflags = (IOF); \
|
2007-02-04 15:37:15 +08:00
|
|
|
\
|
|
|
|
/* Decode the message */ \
|
2007-02-06 06:26:44 +08:00
|
|
|
HDassert(msg_type->decode); \
|
2009-02-13 02:47:04 +08:00
|
|
|
if(NULL == ((MSG)->native = (msg_type->decode)((F), (DXPL), (OH), (MSG)->flags, &ioflags, (MSG)->raw))) \
|
2007-02-04 15:37:15 +08:00
|
|
|
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, ERR, "unable to decode message") \
|
|
|
|
\
|
2009-01-30 04:43:16 +08:00
|
|
|
/* Mark the message dirty if it was changed by decoding */ \
|
2008-08-11 23:16:34 +08:00
|
|
|
if((ioflags & H5O_DECODEIO_DIRTY) && (H5F_get_intent((F)) & H5F_ACC_RDWR)) { \
|
|
|
|
(MSG)->dirty = TRUE; \
|
2009-01-30 04:43:16 +08:00
|
|
|
/* Increment the count of messages dirtied by decoding, but */ \
|
|
|
|
/* only ifndef NDEBUG */ \
|
|
|
|
INCR_NDECODE_DIRTIED(OH) \
|
2008-08-11 23:16:34 +08:00
|
|
|
} \
|
|
|
|
\
|
2007-05-15 04:24:08 +08:00
|
|
|
/* Set the message's "shared info", if it's shareable */ \
|
|
|
|
if((MSG)->flags & H5O_MSG_FLAG_SHAREABLE) { \
|
|
|
|
H5O_UPDATE_SHARED((H5O_shared_t *)(MSG)->native, H5O_SHARE_TYPE_HERE, (F), msg_type->id, (MSG)->crt_idx, (OH)->chunk[0].addr) \
|
|
|
|
} /* end if */ \
|
|
|
|
\
|
2007-02-04 15:37:15 +08:00
|
|
|
/* Set the message's "creation index", if it has one */ \
|
2007-02-06 06:26:44 +08:00
|
|
|
if(msg_type->set_crt_index) { \
|
2007-02-04 15:37:15 +08:00
|
|
|
/* Set the creation index for the message */ \
|
2007-02-06 06:26:44 +08:00
|
|
|
if((msg_type->set_crt_index)((MSG)->native, (MSG)->crt_idx) < 0) \
|
2007-02-04 15:37:15 +08:00
|
|
|
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, ERR, "unable to set creation index") \
|
|
|
|
} /* end if */ \
|
|
|
|
} /* end if */
|
2007-01-23 23:27:28 +08:00
|
|
|
|
2007-05-15 04:24:08 +08:00
|
|
|
/* Flags for a message class's "sharability" */
|
|
|
|
#define H5O_SHARE_IS_SHARABLE 0x01
|
|
|
|
#define H5O_SHARE_IN_OHDR 0x02
|
|
|
|
|
2006-12-07 06:19:52 +08:00
|
|
|
|
2007-01-19 22:54:46 +08:00
|
|
|
/* The "message class" type */
|
2005-12-04 10:27:37 +08:00
|
|
|
struct H5O_msg_class_t {
|
2007-01-19 22:54:46 +08:00
|
|
|
unsigned id; /*message type ID on disk */
|
|
|
|
const char *name; /*for debugging */
|
|
|
|
size_t native_size; /*size of native message */
|
2007-05-15 04:24:08 +08:00
|
|
|
unsigned share_flags; /* Message sharing settings */
|
2009-02-13 02:47:04 +08:00
|
|
|
void *(*decode)(H5F_t*, hid_t, H5O_t *, unsigned, unsigned *, const uint8_t *);
|
2007-02-04 15:37:15 +08:00
|
|
|
herr_t (*encode)(H5F_t*, hbool_t, uint8_t*, const void *);
|
2007-01-19 22:54:46 +08:00
|
|
|
void *(*copy)(const void *, void *); /*copy native value */
|
2007-02-04 15:37:15 +08:00
|
|
|
size_t (*raw_size)(const H5F_t *, hbool_t, const void *);/*sizeof encoded message */
|
2007-01-19 22:54:46 +08:00
|
|
|
herr_t (*reset)(void *); /*free nested data structs */
|
|
|
|
herr_t (*free)(void *); /*free main data struct */
|
2007-05-15 04:24:08 +08:00
|
|
|
herr_t (*del)(H5F_t *, hid_t, H5O_t *, void *); /* Delete space in file referenced by this message */
|
|
|
|
herr_t (*link)(H5F_t *, hid_t, H5O_t *, void *); /* Increment any links in file reference by this message */
|
|
|
|
herr_t (*set_share)(void*, const H5O_shared_t*); /* Set shared information */
|
2007-01-19 22:54:46 +08:00
|
|
|
htri_t (*can_share)(const void *); /* Is message allowed to be shared? */
|
2007-02-04 15:37:15 +08:00
|
|
|
herr_t (*pre_copy_file)(H5F_t *, const void *, hbool_t *, const H5O_copy_t *, void *); /*"pre copy" action when copying native value to file */
|
2007-05-15 04:24:08 +08:00
|
|
|
void *(*copy_file)(H5F_t *, void *, H5F_t *, hbool_t *, H5O_copy_t *, void *, hid_t); /*copy native value to file */
|
2006-10-02 18:24:03 +08:00
|
|
|
herr_t (*post_copy_file)(const H5O_loc_t *, const void *, H5O_loc_t *, void *, hid_t, H5O_copy_t *); /*"post copy" action when copying native value to file */
|
2007-02-07 04:03:06 +08:00
|
|
|
herr_t (*get_crt_index)(const void *, H5O_msg_crt_idx_t *); /* Get message's creation index */
|
|
|
|
herr_t (*set_crt_index)(void *, H5O_msg_crt_idx_t); /* Set message's creation index */
|
2003-02-17 23:54:15 +08:00
|
|
|
herr_t (*debug)(H5F_t*, hid_t, const void*, FILE*, int, int);
|
2005-12-04 10:27:37 +08:00
|
|
|
};
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2007-05-23 10:16:41 +08:00
|
|
|
struct H5O_mesg_t {
|
2005-12-04 10:27:37 +08:00
|
|
|
const H5O_msg_class_t *type; /*type of message */
|
2003-02-17 23:54:15 +08:00
|
|
|
hbool_t dirty; /*raw out of date wrt native */
|
|
|
|
uint8_t flags; /*message flags */
|
2007-02-07 04:03:06 +08:00
|
|
|
H5O_msg_crt_idx_t crt_idx; /*message creation index */
|
2005-05-08 03:37:48 +08:00
|
|
|
unsigned chunkno; /*chunk number for this mesg */
|
2003-02-17 23:54:15 +08:00
|
|
|
void *native; /*native format message */
|
|
|
|
uint8_t *raw; /*ptr to raw data */
|
|
|
|
size_t raw_size; /*size with alignment */
|
2007-05-23 10:16:41 +08:00
|
|
|
};
|
2003-02-17 23:54:15 +08:00
|
|
|
|
|
|
|
typedef struct H5O_chunk_t {
|
|
|
|
hbool_t dirty; /*dirty flag */
|
|
|
|
haddr_t addr; /*chunk file address */
|
|
|
|
size_t size; /*chunk size */
|
2006-10-18 04:36:15 +08:00
|
|
|
size_t gap; /*space at end of chunk too small for null message */
|
2003-02-17 23:54:15 +08:00
|
|
|
uint8_t *image; /*image of file */
|
|
|
|
} H5O_chunk_t;
|
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
struct H5O_t {
|
2003-02-17 23:54:15 +08:00
|
|
|
H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
|
|
|
|
/* first field in structure */
|
2006-11-29 01:43:54 +08:00
|
|
|
|
2007-03-09 04:10:12 +08:00
|
|
|
/* File-specific information (not stored) */
|
2006-11-29 04:29:28 +08:00
|
|
|
size_t sizeof_size; /* Size of file sizes */
|
|
|
|
size_t sizeof_addr; /* Size of file addresses */
|
[svn-r17002] Description:
Rename H5O_protect/H5O_unprotect to be H5O_pin/H5O_unpin, since that's what
that are actually doing.
Add counter of the number of times the object header is pinned, to allow
H5O_pin/H5O_unpin to be called reentrantly.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.7 (amazon) in debug mode
Mac OS X/32 10.5.7 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
2009-06-04 23:13:15 +08:00
|
|
|
|
|
|
|
/* Misc. information (not stored) */
|
|
|
|
unsigned npins; /* Number of times the header is pinned */
|
|
|
|
|
|
|
|
/* Debugging information (not stored) */
|
[svn-r14402] Description:
Add work-around to allow reading files that were produced with a buggy
earlier version of the library, which could create objects with the wrong
object header message count. There is now a configure flag
"--enable-strict-format-checks" which triggers a failure on reading a file
with this sort of corruption (when enabled) and allows the object to be read
(when disabled). The default value for the "strict-format-checks" flag is
yes when the "debug" flag is enabled and no when the "debug" flag is disabled.
Note that if strict format checks are disabled (allowing objects with
this particular kind of corruption to be read) and the file is opened with
write access, the library will re-write the object header for the corrupt
object with the correct # of object header messages.
This closes bugzilla bug #1010.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
2008-01-13 13:37:00 +08:00
|
|
|
#ifdef H5O_ENABLE_BAD_MESG_COUNT
|
|
|
|
hbool_t store_bad_mesg_count; /* Flag to indicate that a bad message count should be stored */
|
|
|
|
/* (This is to simulate a bug in earlier
|
|
|
|
* versions of the library)
|
|
|
|
*/
|
|
|
|
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
|
2009-01-30 04:43:16 +08:00
|
|
|
#ifndef NDEBUG
|
|
|
|
size_t ndecode_dirtied; /* Number of messages dirtied by decoding */
|
|
|
|
#endif /* NDEBUG */
|
2006-11-29 04:29:28 +08:00
|
|
|
|
|
|
|
/* Object information (stored) */
|
2007-03-12 07:15:03 +08:00
|
|
|
hbool_t has_refcount_msg; /* Whether the object has a ref. count message */
|
2006-11-28 07:10:02 +08:00
|
|
|
unsigned nlink; /*link count */
|
2007-03-04 12:28:09 +08:00
|
|
|
uint8_t version; /*version number */
|
|
|
|
uint8_t flags; /*flags */
|
2006-11-29 01:43:54 +08:00
|
|
|
|
2007-03-06 23:50:51 +08:00
|
|
|
/* Time information (stored, for versions > 1 & H5O_HDR_STORE_TIMES flag set) */
|
2006-11-29 01:43:54 +08:00
|
|
|
time_t atime; /*access time */
|
|
|
|
time_t mtime; /*modification time */
|
|
|
|
time_t ctime; /*change time */
|
2006-11-29 04:29:28 +08:00
|
|
|
time_t btime; /*birth time */
|
|
|
|
|
|
|
|
/* Attribute information (stored, for versions > 1) */
|
2006-11-29 12:44:28 +08:00
|
|
|
unsigned max_compact; /* Maximum # of compact attributes */
|
|
|
|
unsigned min_dense; /* Minimum # of "dense" attributes */
|
2006-11-29 01:43:54 +08:00
|
|
|
|
2007-01-19 22:54:46 +08:00
|
|
|
/* Message management (stored, encoded in chunks) */
|
2005-12-04 10:27:37 +08:00
|
|
|
size_t nmesgs; /*number of messages */
|
|
|
|
size_t alloc_nmesgs; /*number of message slots */
|
2003-02-17 23:54:15 +08:00
|
|
|
H5O_mesg_t *mesg; /*array of messages */
|
2007-03-12 10:38:08 +08:00
|
|
|
size_t link_msgs_seen; /* # of link messages seen when loading header */
|
2007-03-12 11:00:31 +08:00
|
|
|
size_t attr_msgs_seen; /* # of attribute messages seen when loading header */
|
2006-11-29 01:43:54 +08:00
|
|
|
|
2006-11-29 02:51:23 +08:00
|
|
|
/* Chunk management (not stored) */
|
2005-12-04 10:27:37 +08:00
|
|
|
size_t nchunks; /*number of chunks */
|
|
|
|
size_t alloc_nchunks; /*chunks allocated */
|
2003-02-17 23:54:15 +08:00
|
|
|
H5O_chunk_t *chunk; /*array of chunks */
|
2005-12-04 10:27:37 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Class for types of objects in file */
|
|
|
|
typedef struct H5O_obj_class_t {
|
2006-11-22 04:22:11 +08:00
|
|
|
H5O_type_t type; /*object type on disk */
|
2005-12-04 10:27:37 +08:00
|
|
|
const char *name; /*for debugging */
|
|
|
|
void *(*get_copy_file_udata)(void); /*retrieve user data for 'copy file' operation */
|
|
|
|
void (*free_copy_file_udata)(void *); /*free user data for 'copy file' operation */
|
|
|
|
htri_t (*isa)(H5O_t *); /*if a header matches an object class */
|
2008-11-13 02:07:51 +08:00
|
|
|
hid_t (*open)(const H5G_loc_t *, hid_t, hid_t, hbool_t ); /*open an object of this class */
|
2007-04-12 00:22:16 +08:00
|
|
|
void *(*create)(H5F_t *, void *, H5G_loc_t *, hid_t ); /*create an object of this class */
|
2006-11-07 05:35:44 +08:00
|
|
|
H5O_loc_t *(*get_oloc)(hid_t ); /*get the object header location for an object */
|
2005-12-04 10:27:37 +08:00
|
|
|
} H5O_obj_class_t;
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2006-11-07 05:35:44 +08:00
|
|
|
/* Node in skip list to map addresses from one file to another during object header copy */
|
|
|
|
typedef struct H5O_addr_map_t {
|
|
|
|
haddr_t src_addr; /* Address of object in source file */
|
|
|
|
haddr_t dst_addr; /* Address of object in destination file */
|
|
|
|
hbool_t is_locked; /* Indicate that the destination object is locked currently */
|
|
|
|
hsize_t inc_ref_count; /* Number of deferred increments to reference count */
|
|
|
|
} H5O_addr_map_t;
|
|
|
|
|
2006-12-07 06:19:52 +08:00
|
|
|
|
2005-11-15 10:55:39 +08:00
|
|
|
/* H5O inherits cache-like properties from H5AC */
|
|
|
|
H5_DLLVAR const H5AC_class_t H5AC_OHDR[1];
|
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Header message ID to class mapping */
|
2007-01-19 22:54:46 +08:00
|
|
|
H5_DLLVAR const H5O_msg_class_t *const H5O_msg_class_g[H5O_MSG_TYPES];
|
2005-12-04 10:27:37 +08:00
|
|
|
|
|
|
|
/* Header object ID to class mapping */
|
|
|
|
H5_DLLVAR const H5O_obj_class_t *const H5O_obj_class_g[3];
|
2005-11-15 10:55:39 +08:00
|
|
|
|
|
|
|
/* Declare external the free list for H5O_t's */
|
|
|
|
H5FL_EXTERN(H5O_t);
|
|
|
|
|
|
|
|
/* Declare external the free list for H5O_mesg_t sequences */
|
|
|
|
H5FL_SEQ_EXTERN(H5O_mesg_t);
|
|
|
|
|
|
|
|
/* Declare external the free list for H5O_chunk_t sequences */
|
|
|
|
H5FL_SEQ_EXTERN(H5O_chunk_t);
|
|
|
|
|
|
|
|
/* Declare external the free list for chunk_image blocks */
|
|
|
|
H5FL_BLK_EXTERN(chunk_image);
|
|
|
|
|
2003-02-17 23:54:15 +08:00
|
|
|
/*
|
2005-12-04 10:27:37 +08:00
|
|
|
* Object header messages
|
2003-02-17 23:54:15 +08:00
|
|
|
*/
|
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Null Message. (0x0000) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_NULL[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Simple Dataspace Message. (0x0001) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_SDSPACE[1];
|
2005-11-15 10:55:39 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Link Information Message. (0x0002) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_LINFO[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Datatype Message. (0x0003) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_DTYPE[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Old Fill Value Message. (0x0004) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_FILL[1];
|
|
|
|
|
|
|
|
/* New Fill Value Message. (0x0005) */
|
2006-06-27 22:45:06 +08:00
|
|
|
/*
|
2005-08-29 13:36:16 +08:00
|
|
|
* The new fill value message is fill value plus
|
2005-08-14 04:53:35 +08:00
|
|
|
* space allocation time and fill value writing time and whether fill
|
2003-02-17 23:54:15 +08:00
|
|
|
* value is defined.
|
|
|
|
*/
|
2005-12-04 10:27:37 +08:00
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_FILL_NEW[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Link Message. (0x0006) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_LINK[1];
|
2005-11-15 10:55:39 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* External File List Message. (0x0007) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_EFL[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Data Layout Message. (0x0008) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_LAYOUT[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
|
|
|
#ifdef H5O_ENABLE_BOGUS
|
2005-12-04 10:27:37 +08:00
|
|
|
/* "Bogus" Message. (0x0009) */
|
2003-02-17 23:54:15 +08:00
|
|
|
/*
|
2005-12-04 10:27:37 +08:00
|
|
|
* Used for debugging - should never be found in valid HDF5 file.
|
2003-02-17 23:54:15 +08:00
|
|
|
*/
|
2005-12-04 10:27:37 +08:00
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_BOGUS[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
#endif /* H5O_ENABLE_BOGUS */
|
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Group Information Message. (0x000a) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_GINFO[1];
|
2005-11-15 10:55:39 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Filter pipeline message. (0x000b) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_PLINE[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Attribute Message. (0x000c) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_ATTR[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Object name message. (0x000d) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_NAME[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Modification Time Message. (0x000e) */
|
2003-02-17 23:54:15 +08:00
|
|
|
/*
|
2005-08-29 13:36:16 +08:00
|
|
|
* The message is just a `time_t'.
|
2003-02-17 23:54:15 +08:00
|
|
|
* (See also the "new" modification time message)
|
|
|
|
*/
|
2005-12-04 10:27:37 +08:00
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_MTIME[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2008-09-16 23:52:51 +08:00
|
|
|
/* Shared Message information message (0x000f)
|
2007-03-02 05:26:31 +08:00
|
|
|
* A message for the superblock extension, holding information about
|
|
|
|
* the file-wide shared message "SOHM" table
|
2003-02-17 23:54:15 +08:00
|
|
|
*/
|
2007-03-02 05:26:31 +08:00
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_SHMESG[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Object Header Continuation Message. (0x0010) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_CONT[1];
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2005-12-04 10:27:37 +08:00
|
|
|
/* Symbol Table Message. (0x0011) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_STAB[1];
|
|
|
|
|
|
|
|
/* New Modification Time Message. (0x0012) */
|
2006-06-27 22:45:06 +08:00
|
|
|
/*
|
2005-12-04 10:27:37 +08:00
|
|
|
* The message is just a `time_t'.
|
2003-02-17 23:54:15 +08:00
|
|
|
*/
|
2005-12-04 10:27:37 +08:00
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_MTIME_NEW[1];
|
|
|
|
|
2008-09-16 23:52:51 +08:00
|
|
|
/* v1 B-tree 'K' value message (0x0013)
|
2007-02-07 02:21:39 +08:00
|
|
|
* A message for the superblock extension, holding information about
|
2007-03-02 05:26:31 +08:00
|
|
|
* the file-wide v1 B-tree 'K' values.
|
2007-02-07 02:21:39 +08:00
|
|
|
*/
|
2007-03-02 05:26:31 +08:00
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_BTREEK[1];
|
|
|
|
|
2008-09-16 23:52:51 +08:00
|
|
|
/* Driver info message (0x0014)
|
2007-03-02 05:26:31 +08:00
|
|
|
* A message for the superblock extension, holding information about
|
|
|
|
* the file driver settings
|
|
|
|
*/
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_DRVINFO[1];
|
2007-02-07 02:21:39 +08:00
|
|
|
|
2007-03-07 04:38:01 +08:00
|
|
|
/* Attribute Information Message. (0x0015) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_AINFO[1];
|
|
|
|
|
2007-03-12 07:15:03 +08:00
|
|
|
/* Reference Count Message. (0x0016) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_REFCOUNT[1];
|
|
|
|
|
2007-05-02 05:00:52 +08:00
|
|
|
/* Placeholder for unknown message. (0x0017) */
|
|
|
|
H5_DLLVAR const H5O_msg_class_t H5O_MSG_UNKNOWN[1];
|
|
|
|
|
2003-02-17 23:54:15 +08:00
|
|
|
|
|
|
|
/*
|
2005-12-04 10:27:37 +08:00
|
|
|
* Object header "object" types
|
2003-02-17 23:54:15 +08:00
|
|
|
*/
|
2005-12-04 10:27:37 +08:00
|
|
|
|
[svn-r14154] Description:
Finish deprecating last H5G symbol (H5G_obj_t) - yay!
Lots of misc. library fixes to remove confusion between links and
objects. The tools could still use another pass, to remove h5trav_type_t type
and make the correct distinction between links & objects.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-09-26 06:18:33 +08:00
|
|
|
/* Group Object. (H5O_TYPE_GROUP - 0) */
|
2005-12-04 10:27:37 +08:00
|
|
|
H5_DLLVAR const H5O_obj_class_t H5O_OBJ_GROUP[1];
|
|
|
|
|
[svn-r14154] Description:
Finish deprecating last H5G symbol (H5G_obj_t) - yay!
Lots of misc. library fixes to remove confusion between links and
objects. The tools could still use another pass, to remove h5trav_type_t type
and make the correct distinction between links & objects.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-09-26 06:18:33 +08:00
|
|
|
/* Dataset Object. (H5O_TYPE_DATASET - 1) */
|
2005-12-04 10:27:37 +08:00
|
|
|
H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATASET[1];
|
|
|
|
|
[svn-r14154] Description:
Finish deprecating last H5G symbol (H5G_obj_t) - yay!
Lots of misc. library fixes to remove confusion between links and
objects. The tools could still use another pass, to remove h5trav_type_t type
and make the correct distinction between links & objects.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
AIX/32 5.3 (copper) w/FORTRAN, w/parallel, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
2007-09-26 06:18:33 +08:00
|
|
|
/* Datatype Object. (H5O_TYPE_NAMED_DATATYPE - 2) */
|
2005-12-04 10:27:37 +08:00
|
|
|
H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATATYPE[1];
|
|
|
|
|
2003-02-17 23:54:15 +08:00
|
|
|
|
|
|
|
/* Package-local function prototypes */
|
2007-05-23 10:16:41 +08:00
|
|
|
H5_DLL herr_t H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg);
|
2005-12-04 10:27:37 +08:00
|
|
|
H5_DLL herr_t H5O_flush_msgs(H5F_t *f, H5O_t *oh);
|
2008-11-13 02:07:51 +08:00
|
|
|
H5_DLL hid_t H5O_open_by_loc(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref);
|
2007-05-15 04:24:08 +08:00
|
|
|
H5_DLL herr_t H5O_delete_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, H5O_mesg_t *mesg);
|
2006-11-18 02:48:00 +08:00
|
|
|
H5_DLL const H5O_obj_class_t *H5O_obj_class_real(H5O_t *oh);
|
2006-11-18 04:12:28 +08:00
|
|
|
|
2006-12-04 19:25:01 +08:00
|
|
|
/* Object header message routines */
|
2007-02-06 06:26:44 +08:00
|
|
|
H5_DLL unsigned H5O_msg_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
2007-02-27 02:18:08 +08:00
|
|
|
const H5O_msg_class_t *type, unsigned *mesg_flags, void *mesg);
|
2006-12-09 06:05:52 +08:00
|
|
|
H5_DLL herr_t H5O_msg_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
|
|
|
const H5O_msg_class_t *type, unsigned mesg_flags, unsigned update_flags,
|
2007-02-27 02:18:08 +08:00
|
|
|
void *mesg);
|
2007-03-10 12:56:53 +08:00
|
|
|
H5_DLL herr_t H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
|
|
|
const H5O_msg_class_t *type, unsigned mesg_flags, unsigned update_flags,
|
|
|
|
void *mesg);
|
2006-12-04 19:25:01 +08:00
|
|
|
H5_DLL void *H5O_msg_free_real(const H5O_msg_class_t *type, void *mesg);
|
|
|
|
H5_DLL herr_t H5O_msg_free_mesg(H5O_mesg_t *mesg);
|
2007-02-07 04:03:06 +08:00
|
|
|
H5_DLL unsigned H5O_msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type);
|
2007-03-10 12:56:53 +08:00
|
|
|
H5_DLL herr_t H5O_msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
|
|
|
|
int sequence, H5O_operator_t op, void *op_data, hbool_t adj_link, hid_t dxpl_id);
|
2007-02-04 15:37:15 +08:00
|
|
|
H5_DLL void *H5O_msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src,
|
2007-05-15 04:24:08 +08:00
|
|
|
void *mesg_src, H5F_t *file_dst, hbool_t *recompute_size,
|
|
|
|
H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
|
2006-12-07 06:19:52 +08:00
|
|
|
H5_DLL herr_t H5O_msg_iterate_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
|
2007-02-27 02:18:08 +08:00
|
|
|
const H5O_mesg_operator_t *op, void *op_data, hid_t dxpl_id);
|
2006-12-04 19:25:01 +08:00
|
|
|
|
2007-07-18 03:35:09 +08:00
|
|
|
/* Collect storage info for btree and heap */
|
|
|
|
H5_DLL herr_t H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
|
|
|
H5_ih_info_t *bh_info);
|
|
|
|
H5_DLL herr_t H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
|
|
|
H5_ih_info_t *bh_info);
|
|
|
|
H5_DLL herr_t H5O_attr_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
|
|
|
H5_ih_info_t *bh_info);
|
2007-07-14 05:12:25 +08:00
|
|
|
|
2006-11-18 04:12:28 +08:00
|
|
|
/* Object header allocation routines */
|
2007-03-10 23:47:59 +08:00
|
|
|
H5_DLL herr_t H5O_alloc_msgs(H5O_t *oh, size_t min_alloc);
|
2006-11-18 04:12:28 +08:00
|
|
|
H5_DLL unsigned H5O_alloc(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
2007-02-27 02:18:08 +08:00
|
|
|
const H5O_msg_class_t *type, const void *mesg);
|
2006-11-18 04:12:28 +08:00
|
|
|
H5_DLL herr_t H5O_condense_header(H5F_t *f, H5O_t *oh, hid_t dxpl_id);
|
|
|
|
H5_DLL herr_t H5O_release_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
2007-02-06 06:26:44 +08:00
|
|
|
H5O_mesg_t *mesg, hbool_t adj_link);
|
2006-11-18 04:12:28 +08:00
|
|
|
|
2003-10-06 05:12:26 +08:00
|
|
|
/* Shared object operators */
|
2009-02-13 02:47:04 +08:00
|
|
|
H5_DLL void * H5O_shared_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
|
|
|
|
unsigned *ioflags, const uint8_t *buf, const H5O_msg_class_t *type);
|
2007-02-04 15:37:15 +08:00
|
|
|
H5_DLL herr_t H5O_shared_encode(const H5F_t *f, uint8_t *buf/*out*/, const H5O_shared_t *sh_mesg);
|
|
|
|
H5_DLL size_t H5O_shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg);
|
2007-05-15 04:24:08 +08:00
|
|
|
H5_DLL herr_t H5O_shared_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
|
|
|
|
const H5O_msg_class_t *mesg_type, H5O_shared_t *sh_mesg);
|
|
|
|
H5_DLL herr_t H5O_shared_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh,
|
|
|
|
const H5O_msg_class_t *mesg_type, H5O_shared_t *sh_mesg);
|
2008-09-16 23:52:51 +08:00
|
|
|
H5_DLL herr_t H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst,
|
2007-01-24 03:08:31 +08:00
|
|
|
const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst,
|
2007-05-15 04:24:08 +08:00
|
|
|
hbool_t *recompute_size, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id);
|
2007-05-31 05:35:57 +08:00
|
|
|
H5_DLL herr_t H5O_shared_post_copy_file (H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *mesg);
|
2007-02-04 15:37:15 +08:00
|
|
|
H5_DLL herr_t H5O_shared_debug(const H5O_shared_t *mesg, FILE *stream,
|
|
|
|
int indent, int fwidth);
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2007-03-10 12:56:53 +08:00
|
|
|
/* Attribute message operators */
|
2007-02-20 10:28:41 +08:00
|
|
|
H5_DLL herr_t H5O_attr_reset(void *_mesg);
|
2007-05-15 04:24:08 +08:00
|
|
|
H5_DLL herr_t H5O_attr_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
|
|
|
|
H5_DLL herr_t H5O_attr_link(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
|
2009-02-13 06:41:52 +08:00
|
|
|
H5_DLL herr_t H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
|
|
|
hsize_t *nattrs);
|
|
|
|
|
2006-12-12 03:02:38 +08:00
|
|
|
|
2006-12-07 06:19:52 +08:00
|
|
|
/* These functions operate on object locations */
|
|
|
|
H5_DLL H5O_loc_t *H5O_get_loc(hid_t id);
|
|
|
|
|
2005-11-15 10:55:39 +08:00
|
|
|
/* Useful metadata cache callbacks */
|
|
|
|
H5_DLL herr_t H5O_dest(H5F_t *f, H5O_t *oh);
|
2003-02-17 23:54:15 +08:00
|
|
|
|
2006-12-07 06:19:52 +08:00
|
|
|
/* Testing functions */
|
|
|
|
#ifdef H5O_TESTING
|
2007-02-07 04:03:06 +08:00
|
|
|
H5_DLL htri_t H5O_is_attr_empty_test(hid_t oid);
|
2006-12-07 06:19:52 +08:00
|
|
|
H5_DLL htri_t H5O_is_attr_dense_test(hid_t oid);
|
2007-02-07 04:03:06 +08:00
|
|
|
H5_DLL herr_t H5O_num_attrs_test(hid_t oid, hsize_t *nattrs);
|
2007-02-07 10:18:17 +08:00
|
|
|
H5_DLL herr_t H5O_attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count);
|
2007-05-02 05:00:52 +08:00
|
|
|
H5_DLL herr_t H5O_check_msg_marked_test(hid_t oid, hbool_t flag_val);
|
2006-12-07 06:19:52 +08:00
|
|
|
#endif /* H5O_TESTING */
|
|
|
|
|
|
|
|
/* Object header debugging routines */
|
|
|
|
#ifdef H5O_DEBUG
|
|
|
|
H5_DLL herr_t H5O_assert(const H5O_t *oh);
|
|
|
|
#endif /* H5O_DEBUG */
|
|
|
|
H5_DLL herr_t H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, int indent, int fwidth);
|
|
|
|
|
2003-02-17 23:54:15 +08:00
|
|
|
#endif /* _H5Opkg_H */
|
2005-11-15 10:55:39 +08:00
|
|
|
|