48 static H5_INLINE
void *
50 unsigned *ioflags,
size_t p_size,
const uint8_t *p)
54 FUNC_ENTER_NOAPI_NOINIT
56 #ifndef H5O_SHARED_TYPE 57 #error "Need to define H5O_SHARED_TYPE macro!" 59 #ifndef H5O_SHARED_DECODE 60 #error "Need to define H5O_SHARED_DECODE macro!" 62 #ifndef H5O_SHARED_DECODE_REAL 63 #error "Need to define H5O_SHARED_DECODE_REAL macro!" 67 if(mesg_flags & H5O_MSG_FLAG_SHARED) {
69 if(NULL == (ret_value =
H5O_shared_decode(f, dxpl_id, open_oh, ioflags, p, H5O_SHARED_TYPE)))
73 #ifdef H5_STRICT_FORMAT_CHECKS 77 *ioflags &= ~H5O_DECODEIO_DIRTY;
82 if(NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, dxpl_id, open_oh, mesg_flags, ioflags, p_size, p)))
87 FUNC_LEAVE_NOAPI(ret_value)
111 const H5O_shared_t *sh_mesg = (
const H5O_shared_t *)_mesg;
114 FUNC_ENTER_NOAPI_NOINIT
116 #ifndef H5O_SHARED_TYPE 117 #error "Need to define H5O_SHARED_TYPE macro!" 119 #ifndef H5O_SHARED_ENCODE 120 #error "Need to define H5O_SHARED_ENCODE macro!" 122 #ifndef H5O_SHARED_ENCODE_REAL 123 #error "Need to define H5O_SHARED_ENCODE_REAL macro!" 127 HDassert(sh_mesg->type == H5O_SHARE_TYPE_UNSHARED || sh_mesg->msg_type_id == H5O_SHARED_TYPE->id);
130 if(H5O_IS_STORED_SHARED(sh_mesg->type) && !disable_shared) {
137 if(H5O_SHARED_ENCODE_REAL(f, p, _mesg) < 0)
142 FUNC_LEAVE_NOAPI(ret_value)
163 static H5_INLINE
size_t 166 const H5O_shared_t *sh_mesg = (
const H5O_shared_t *)_mesg;
169 FUNC_ENTER_NOAPI_NOINIT
171 #ifndef H5O_SHARED_TYPE 172 #error "Need to define H5O_SHARED_TYPE macro!" 174 #ifndef H5O_SHARED_SIZE 175 #error "Need to define H5O_SHARED_SIZE macro!" 177 #ifndef H5O_SHARED_SIZE_REAL 178 #error "Need to define H5O_SHARED_SIZE_REAL macro!" 182 if(H5O_IS_STORED_SHARED(sh_mesg->type) && !disable_shared) {
189 if(0 == (ret_value = H5O_SHARED_SIZE_REAL(f, _mesg)))
194 FUNC_LEAVE_NOAPI(ret_value)
219 H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg;
222 FUNC_ENTER_NOAPI_NOINIT
224 #ifndef H5O_SHARED_TYPE 225 #error "Need to define H5O_SHARED_TYPE macro!" 227 #ifndef H5O_SHARED_DELETE 228 #error "Need to define H5O_SHARED_DELETE macro!" 232 if(H5O_IS_TRACKED_SHARED(sh_mesg->type)) {
237 #ifdef H5O_SHARED_DELETE_REAL 240 if(H5O_SHARED_DELETE_REAL(f, dxpl_id, open_oh, _mesg) < 0)
246 FUNC_LEAVE_NOAPI(ret_value)
271 H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg;
274 FUNC_ENTER_NOAPI_NOINIT
276 #ifndef H5O_SHARED_TYPE 277 #error "Need to define H5O_SHARED_TYPE macro!" 279 #ifndef H5O_SHARED_LINK 280 #error "Need to define H5O_SHARED_LINK macro!" 284 if(H5O_IS_TRACKED_SHARED(sh_mesg->type)) {
289 #ifdef H5O_SHARED_LINK_REAL 292 if(H5O_SHARED_LINK_REAL(f, dxpl_id, open_oh, _mesg) < 0)
298 FUNC_LEAVE_NOAPI(ret_value)
319 static H5_INLINE
void *
321 hbool_t *recompute_size,
unsigned *mesg_flags, H5O_copy_t *cpy_info,
322 void *udata,
hid_t dxpl_id)
324 void *dst_mesg = NULL;
327 FUNC_ENTER_NOAPI_NOINIT
329 #ifndef H5O_SHARED_TYPE 330 #error "Need to define H5O_SHARED_TYPE macro!" 332 #ifndef H5O_SHARED_COPY_FILE 333 #error "Need to define H5O_SHARED_COPY_FILE macro!" 336 #ifdef H5O_SHARED_COPY_FILE_REAL 338 if(NULL == (dst_mesg = H5O_SHARED_COPY_FILE_REAL(file_src, H5O_SHARED_TYPE, _native_src, file_dst, recompute_size, cpy_info, udata, dxpl_id)))
342 if(NULL == (dst_mesg = (H5O_SHARED_TYPE->copy)(_native_src, NULL)))
347 HDmemset(dst_mesg, 0,
sizeof(H5O_shared_t));
351 dst_mesg, recompute_size, mesg_flags, cpy_info, udata, dxpl_id) < 0)
355 ret_value = dst_mesg;
360 H5O_msg_free(H5O_SHARED_TYPE->id, dst_mesg);
362 FUNC_LEAVE_NOAPI(ret_value)
385 H5O_loc_t *oloc_dst,
void *mesg_dst,
unsigned *mesg_flags,
hid_t dxpl_id,
386 H5O_copy_t *cpy_info)
388 const H5O_shared_t *shared_src = (
const H5O_shared_t *)mesg_src;
389 H5O_shared_t *shared_dst = (H5O_shared_t *)mesg_dst;
392 FUNC_ENTER_NOAPI_NOINIT
394 HDassert(oloc_src->file);
395 HDassert(oloc_dst->file);
400 #ifndef H5O_SHARED_TYPE 401 #error "Need to define H5O_SHARED_TYPE macro!" 403 #ifndef H5O_SHARED_POST_COPY_FILE 404 #error "Need to define H5O_SHARED_POST_COPY_FILE macro!" 407 #ifdef H5O_SHARED_POST_COPY_FILE_REAL 409 if(H5O_SHARED_POST_COPY_FILE_REAL(oloc_src, mesg_src, oloc_dst, mesg_dst, dxpl_id, cpy_info) <0 )
417 shared_src, shared_dst, mesg_flags, dxpl_id, cpy_info) < 0)
420 #ifdef H5O_SHARED_POST_COPY_FILE_UPD 423 if(H5O_SHARED_POST_COPY_FILE_UPD(oloc_src, mesg_src, oloc_dst, mesg_dst, dxpl_id, cpy_info) < 0)
429 HDassert((shared_src->type == H5O_SHARE_TYPE_COMMITTED)
430 == (shared_dst->type == H5O_SHARE_TYPE_COMMITTED));
433 FUNC_LEAVE_NOAPI(ret_value)
456 int indent,
int fwidth)
458 const H5O_shared_t *sh_mesg = (
const H5O_shared_t *)_mesg;
461 FUNC_ENTER_NOAPI_NOINIT
463 #ifndef H5O_SHARED_TYPE 464 #error "Need to define H5O_SHARED_TYPE macro!" 466 #ifndef H5O_SHARED_DEBUG 467 #error "Need to define H5O_SHARED_DEBUG macro!" 469 #ifndef H5O_SHARED_DEBUG_REAL 470 #error "Need to define H5O_SHARED_DEBUG_REAL macro!" 474 if(H5O_IS_STORED_SHARED(sh_mesg->type)) {
481 if(H5O_SHARED_DEBUG_REAL(f, dxpl_id, _mesg, stream, indent, fwidth) < 0)
485 FUNC_LEAVE_NOAPI(ret_value)
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)
static H5_INLINE void * H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id)
static H5_INLINE herr_t H5O_SHARED_ENCODE(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg)
static H5_INLINE herr_t H5O_SHARED_DEBUG(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream, int indent, int fwidth)
static H5_INLINE herr_t H5O_SHARED_POST_COPY_FILE(const H5O_loc_t *oloc_src, const void *mesg_src, H5O_loc_t *oloc_dst, void *mesg_dst, unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info)
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)
static H5_INLINE herr_t H5O_SHARED_LINK(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
H5_DLL size_t H5O_shared_size(const H5F_t *f, const H5O_shared_t *sh_mesg)
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)
#define HDmemset(dst, c, n)
H5_DLL herr_t H5O_shared_copy_file(H5F_t *file_src, H5F_t *file_dst, const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst, hbool_t *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id)
static H5_INLINE void * H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p)
#define H5O_DECODEIO_DIRTY
H5_DLL herr_t H5O_shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O_shared_t *shared_src, H5O_shared_t *shared_dst, unsigned *mesg_flags, hid_t dxpl_id, H5O_copy_t *cpy_info)
H5_DLL herr_t H5O_shared_debug(const H5O_shared_t *mesg, FILE *stream, int indent, int fwidth)
H5_DLL herr_t H5O_shared_encode(const H5F_t *f, uint8_t *buf, const H5O_shared_t *sh_mesg)
#define HGOTO_ERROR(err, ret_val)
static H5_INLINE herr_t H5O_SHARED_DELETE(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
static H5_INLINE size_t H5O_SHARED_SIZE(const H5F_t *f, hbool_t disable_shared, const void *_mesg)