Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move FUNC_ENTER macros to their own header files #4971

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,8 @@ set (H5_PUBLIC_HEADERS

set (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5private.h
${HDF5_SRC_DIR}/H5func_enter.h
${HDF5_SRC_DIR}/H5func_enter_threadsafe.h
${HDF5_SRC_DIR}/H5timer.h

${HDF5_SRC_DIR}/H5Apkg.h
Expand Down
2 changes: 1 addition & 1 deletion src/H5Aint.c
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,7 @@ H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo)
H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
htri_t ret_value = FAIL; /* Return value */

FUNC_ENTER_NOAPI_TAG(oh->cache_info.addr, FAIL)
FUNC_ENTER_PACKAGE_TAG(oh->cache_info.addr)

/* check arguments */
assert(f);
Expand Down
4 changes: 2 additions & 2 deletions src/H5B2int.c
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,7 @@ H5B2__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
{
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_PACKAGE

/* Sanity check */
assert(parent_entry);
Expand Down Expand Up @@ -2006,7 +2006,7 @@ H5B2__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
{
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_PACKAGE

/* Sanity check */
assert(parent_entry);
Expand Down
4 changes: 2 additions & 2 deletions src/H5Dchunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ H5D__chunk_set_sizes(H5D_t *dset)
unsigned u; /* Iterator */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* Sanity checks */
assert(dset);
Expand Down Expand Up @@ -8226,7 +8226,7 @@ H5D__chunk_get_offset_copy(const H5D_t *dset, const hsize_t *offset, hsize_t *of
unsigned u;
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

assert(dset);
assert(offset);
Expand Down
4 changes: 2 additions & 2 deletions src/H5Dio.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ H5D__read(size_t count, H5D_dset_io_info_t *dset_info)
char fake_char; /* Temporary variable for NULL buffer pointers */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

#ifdef H5_HAVE_PARALLEL
/* Reset the actual io mode properties to the default values in case
Expand Down Expand Up @@ -530,7 +530,7 @@ H5D__write(size_t count, H5D_dset_io_info_t *dset_info)
char fake_char; /* Temporary variable for NULL buffer pointers */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

#ifdef H5_HAVE_PARALLEL
/* Reset the actual io mode properties to the default values in case
Expand Down
2 changes: 1 addition & 1 deletion src/H5Dlayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ H5D__layout_set_version(H5F_t *f, H5O_layout_t *layout)
unsigned version; /* Message version */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* Sanity check */
assert(layout);
Expand Down
4 changes: 2 additions & 2 deletions src/H5FDint.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ H5FD__read_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_t
size_t vec_arr_nused = 0;
herr_t ret_value = SUCCEED;

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* Sanity checks */
assert(file);
Expand Down Expand Up @@ -1542,7 +1542,7 @@ H5FD__write_selection_translate(uint32_t skip_vector_cb, H5FD_t *file, H5FD_mem_
size_t vec_arr_nused = 0;
herr_t ret_value = SUCCEED;

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* Sanity checks */
assert(file);
Expand Down
2 changes: 1 addition & 1 deletion src/H5FDmpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -3820,7 +3820,7 @@ H5FD__mpio_ctl(H5FD_t *_file, uint64_t op_code, uint64_t flags, const void H5_AT
H5FD_mpio_t *file = (H5FD_mpio_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* Sanity checks */
assert(file);
Expand Down
2 changes: 1 addition & 1 deletion src/H5FL.c
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ H5FL__fac_gc(void)
H5FL_fac_gc_node_t *gc_node; /* Pointer into the list of things to garbage collect */
herr_t ret_value = SUCCEED; /* return value*/

FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_PACKAGE

/* Walk through all the free lists, free()'ing the nodes */
gc_node = H5FL_fac_gc_head.first;
Expand Down
2 changes: 1 addition & 1 deletion src/H5FScache.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ H5FS__cache_hdr_notify(H5AC_notify_action_t action, void *_thing)
H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_PACKAGE

/* Sanity check */
assert(fspace);
Expand Down
4 changes: 2 additions & 2 deletions src/H5FSint.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ H5FS__create_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
{
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_PACKAGE

/* Sanity check */
assert(parent_entry);
Expand Down Expand Up @@ -106,7 +106,7 @@ H5FS__destroy_flush_depend(H5AC_info_t *parent_entry, H5AC_info_t *child_entry)
{
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_PACKAGE

/* Sanity check */
assert(parent_entry);
Expand Down
4 changes: 2 additions & 2 deletions src/H5Faccum.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ H5F__accum_write(H5F_shared_t *f_sh, H5FD_mem_t map_type, haddr_t addr, size_t s
H5FD_t *file; /* File driver pointer */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* Sanity checks */
assert(f_sh);
Expand Down Expand Up @@ -1004,7 +1004,7 @@ H5F__accum_flush(H5F_shared_t *f_sh)
{
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* Sanity checks */
assert(f_sh);
Expand Down
2 changes: 1 addition & 1 deletion src/H5Gstab.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ H5G__stab_get_name_by_idx(const H5O_loc_t *oloc, H5_iter_order_t order, hsize_t
/* Portably clear udata struct (before FUNC_ENTER) */
memset(&udata, 0, sizeof(udata));

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* Sanity check */
assert(oloc);
Expand Down
2 changes: 1 addition & 1 deletion src/H5HG.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ H5HG__free(H5HG_heap_t *heap)
{
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* Check arguments */
assert(heap);
Expand Down
2 changes: 1 addition & 1 deletion src/H5Oattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ H5O__attr_delete(H5F_t *f, H5O_t *oh, void *_mesg)
H5A_t *attr = (H5A_t *)_mesg;
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_PACKAGE

/* check args */
assert(f);
Expand Down
2 changes: 1 addition & 1 deletion src/H5Oattribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ H5O__attr_create(const H5O_loc_t *loc, H5A_t *attr)
htri_t shared_mesg; /* Should this message be stored in the Shared Message table? */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_PACKAGE

/* Check arguments */
assert(loc);
Expand Down
18 changes: 13 additions & 5 deletions src/H5Oshared.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ H5O_SHARED_DECODE(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *iofla
{
void *ret_value = NULL; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
/* H5O_SHARED_ENCODE will be defined as a package function */
FUNC_ENTER_PACKAGE

#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
Expand Down Expand Up @@ -97,7 +98,8 @@ H5O_SHARED_ENCODE(H5F_t *f, bool disable_shared, size_t H5_ATTR_UNUSED p_size, u
(const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
/* H5O_SHARED_ENCODE will be defined as a package function */
FUNC_ENTER_PACKAGE

#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
Expand Down Expand Up @@ -148,7 +150,8 @@ H5O_SHARED_SIZE(const H5F_t *f, bool disable_shared, const void *_mesg)
(const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
size_t ret_value = 0; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
/* H5O_SHARED_SIZE will be defined as a package function */
FUNC_ENTER_PACKAGE

#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
Expand Down Expand Up @@ -195,6 +198,7 @@ H5O_SHARED_DELETE(H5F_t *f, H5O_t *open_oh, void *_mesg)
H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
herr_t ret_value = SUCCEED; /* Return value */

/* H5O_SHARED_DELETE will be defined as a package function */
FUNC_ENTER_PACKAGE

#ifndef H5O_SHARED_TYPE
Expand Down Expand Up @@ -241,6 +245,7 @@ H5O_SHARED_LINK(H5F_t *f, H5O_t *open_oh, void *_mesg)
H5O_shared_t *sh_mesg = (H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
herr_t ret_value = SUCCEED; /* Return value */

/* H5O_SHARED_LINK will be defined as a package function */
FUNC_ENTER_PACKAGE

#ifndef H5O_SHARED_TYPE
Expand Down Expand Up @@ -287,6 +292,7 @@ H5O_SHARED_COPY_FILE(H5F_t *file_src, void *_native_src, H5F_t *file_dst, bool *
void *dst_mesg = NULL; /* Destination message */
void *ret_value = NULL; /* Return value */

/* H5O_SHARED_COPY_FILE will be defined as a package function */
FUNC_ENTER_PACKAGE

#ifndef H5O_SHARED_TYPE
Expand Down Expand Up @@ -347,7 +353,8 @@ H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_NDEBUG_UNUSED *oloc_src, const
H5O_shared_t *shared_dst = (H5O_shared_t *)mesg_dst; /* Alias to shared info in native destination */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
/* H5O_SHARED_POST_COPY_FILE will be defined as a package function */
FUNC_ENTER_PACKAGE

assert(oloc_src->file);
assert(oloc_dst->file);
Expand Down Expand Up @@ -409,7 +416,8 @@ H5O_SHARED_DEBUG(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwid
(const H5O_shared_t *)_mesg; /* Pointer to shared message portion of actual message */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
/* H5O_SHARED_DEBUG will be defined as a package function */
FUNC_ENTER_PACKAGE

#ifndef H5O_SHARED_TYPE
#error "Need to define H5O_SHARED_TYPE macro!"
Expand Down
2 changes: 1 addition & 1 deletion src/H5Pint.c
Original file line number Diff line number Diff line change
Expand Up @@ -5494,7 +5494,7 @@ H5P__close_class(H5P_genclass_t *pclass)
{
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_PACKAGE

assert(pclass);

Expand Down
2 changes: 1 addition & 1 deletion src/H5Tvlen.c
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info
void *free_info; /* Free info */
herr_t ret_value = SUCCEED; /* Return value */

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* Sanity checks */
assert(elem);
Expand Down
2 changes: 1 addition & 1 deletion src/H5VLnative.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ H5VL__native_get_file_addr_len(void *obj, H5I_type_t obj_type, size_t *addr_len)
H5F_t *file = NULL; /* File struct pointer */
herr_t ret_value = SUCCEED;

FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_PACKAGE

/* check arguments */
assert(obj);
Expand Down
Loading
Loading