diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-31 18:19:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-31 18:19:49 (GMT) |
commit | 2d74d46d3fe259ed51b2b996b56559563999e852 (patch) | |
tree | faff172323e140a2446f90e935589708f9bd0830 /src/H5Opkg.h | |
parent | 7191f26717255667e86c86559ffc316f73f4c1bd (diff) | |
download | hdf5-2d74d46d3fe259ed51b2b996b56559563999e852.zip hdf5-2d74d46d3fe259ed51b2b996b56559563999e852.tar.gz hdf5-2d74d46d3fe259ed51b2b996b56559563999e852.tar.bz2 |
[svn-r16392] Description:
Bring r16367:16391 back from trunk into revise_chunks branch.
Tested on:
FreeBSD 6.3/32 (duty)
(h5committest not required on this branch)
Diffstat (limited to 'src/H5Opkg.h')
-rw-r--r-- | src/H5Opkg.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/H5Opkg.h b/src/H5Opkg.h index f15198e..b7d4202 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -171,6 +171,13 @@ #define H5O_DECODEIO_NOCHANGE 0x01u /* IN: do not modify values */ #define H5O_DECODEIO_DIRTY 0x02u /* OUT: message has been changed */ +/* 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 */ + /* Load native information for a message, if it's not already present */ /* (Only works for messages with decode callback) */ #define H5O_LOAD_NATIVE(F, DXPL, IOF, OH, MSG, ERR) \ @@ -183,11 +190,12 @@ if(NULL == ((MSG)->native = (msg_type->decode)((F), (DXPL), (MSG)->flags, &ioflags, (MSG)->raw))) \ HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, ERR, "unable to decode message") \ \ - /* Mark the object header dirty if the message was changed by decoding */ \ + /* Mark the message dirty if it was changed by decoding */ \ if((ioflags & H5O_DECODEIO_DIRTY) && (H5F_get_intent((F)) & H5F_ACC_RDWR)) { \ (MSG)->dirty = TRUE; \ - if(H5AC_mark_pinned_or_protected_entry_dirty((F), (OH)) < 0) \ - HGOTO_ERROR(H5E_OHDR, H5E_CANTMARKDIRTY, ERR, "unable to mark object header as dirty") \ + /* Increment the count of messages dirtied by decoding, but */ \ + /* only ifndef NDEBUG */ \ + INCR_NDECODE_DIRTIED(OH) \ } \ \ /* Set the message's "shared info", if it's shareable */ \ @@ -264,6 +272,9 @@ struct H5O_t { * versions of the library) */ #endif /* H5O_ENABLE_BAD_MESG_COUNT */ +#ifndef NDEBUG + size_t ndecode_dirtied; /* Number of messages dirtied by decoding */ +#endif /* NDEBUG */ /* Object information (stored) */ hbool_t has_refcount_msg; /* Whether the object has a ref. count message */ |