summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCInformation.cmake
blob: 2695b6a8bedd657c7887689a354eb8ddb3ca4534 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# This file sets the basic flags for the C language in CMake.
# It also loads the available platform file for the system-compiler
# if it exists.

GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
IF(CMAKE_COMPILER_IS_GNUCC)
  SET(CMAKE_BASE_NAME gcc)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE 
  ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)

# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
IF(NOT CMAKE_MODULE_EXISTS)
  SET(CMAKE_SHARED_MODULE_C_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
  SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
ENDIF(NOT CMAKE_MODULE_EXISTS)

SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_ENV_INIT} $ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}" CACHE STRING
     "Flags for C compiler.")

IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# default build type is none
  IF(NOT CMAKE_NO_BUILD_TYPE)
    SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING 
      "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
  ENDIF(NOT CMAKE_NO_BUILD_TYPE)
  SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING
    "Flags used by the compiler during debug builds.")
  SET (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL_INIT}" CACHE STRING
    "Flags used by the compiler during release minsize builds.")
  SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT}" CACHE STRING
    "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
  SET (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
    "Flags used by the compiler during Release with Debug Info builds.")
ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)

INCLUDE(CMakeCommonLanguageInclude)

# now define the following rule variables

# CMAKE_C_CREATE_SHARED_LIBRARY
# CMAKE_C_CREATE_SHARED_MODULE
# CMAKE_C_CREATE_STATIC_LIBRARY
# CMAKE_C_COMPILE_OBJECT
# CMAKE_C_LINK_EXECUTABLE

# variables supplied by the generator at use time
# <TARGET>
# <TARGET_BASE> the target without the suffix
# <OBJECTS>
# <OBJECT>
# <LINK_LIBRARIES>
# <FLAGS>
# <LINK_FLAGS>

# C compiler information
# <CMAKE_C_COMPILER>  
# <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS>
# <CMAKE_SHARED_MODULE_CREATE_C_FLAGS>
# <CMAKE_C_LINK_FLAGS>

# Static library tools
# <CMAKE_AR> 
# <CMAKE_RANLIB>


# create a C shared library
IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
  SET(CMAKE_C_CREATE_SHARED_LIBRARY
      "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <CMAKE_SHARED_LIBRARY_SONAME_C_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)

# create a C shared module just copy the shared library rule
IF(NOT CMAKE_C_CREATE_SHARED_MODULE)
  SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)

# create a C static library
IF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)
  SET(CMAKE_C_CREATE_STATIC_LIBRARY
      "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
      "<CMAKE_RANLIB> <TARGET> ")
ENDIF(NOT CMAKE_C_CREATE_STATIC_LIBRARY)

# compile a C file into an object file
IF(NOT CMAKE_C_COMPILE_OBJECT)
  SET(CMAKE_C_COMPILE_OBJECT
    "<CMAKE_C_COMPILER> -o <OBJECT>  <FLAGS> -c <SOURCE>")
ENDIF(NOT CMAKE_C_COMPILE_OBJECT)

IF(NOT CMAKE_C_LINK_EXECUTABLE)
  SET(CMAKE_C_LINK_EXECUTABLE
    "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS>  -o <TARGET> <LINK_LIBRARIES>")
ENDIF(NOT CMAKE_C_LINK_EXECUTABLE)

IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
   INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})
ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE)

MARK_AS_ADVANCED(
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
)
SET(CMAKE_C_INFOMATION_LOADED 1)


hat point, instead of needlessly performing them (over & over :-) at run-time. This reduces the library's size (and thus staticly linked binaries) and has a minor speedup effect also. Platforms tested: IRIX64 6.5 (modi4) with parallel & FORTRAN enabled, and additional testing on FreeBSD and Solaris immediately after the checkin.
Diffstat (limited to 'src')
-rw-r--r--src/H5.c14
-rw-r--r--src/H5A.c30
-rw-r--r--src/H5AC.c20
-rw-r--r--src/H5B.c29
-rw-r--r--src/H5D.c93
-rw-r--r--src/H5Dcontig.c8
-rw-r--r--src/H5Distore.c52
-rw-r--r--src/H5Dseq.c8
-rw-r--r--src/H5E.c50
-rw-r--r--src/H5Epublic.h1
-rw-r--r--src/H5F.c62
-rw-r--r--src/H5FD.c85
-rw-r--r--src/H5FDcore.c26
-rw-r--r--src/H5FDfamily.c36
-rw-r--r--src/H5FDgass.c34
-rw-r--r--src/H5FDlog.c34
-rw-r--r--src/H5FDmpio.c85
-rw-r--r--src/H5FDsec2.c24
-rw-r--r--src/H5FDsrb.c33
-rw-r--r--src/H5FDstream.c26
-rw-r--r--src/H5FL.c20
-rw-r--r--src/H5Farray.c6
-rw-r--r--src/H5Fcontig.c8
-rw-r--r--src/H5Fistore.c52
-rw-r--r--src/H5Fseq.c8
-rw-r--r--src/H5G.c68
-rw-r--r--src/H5Gent.c18
-rw-r--r--src/H5Gnode.c26
-rw-r--r--src/H5Gstab.c9
-rw-r--r--src/H5HG.c18
-rw-r--r--src/H5HL.c18
-rw-r--r--src/H5I.c26
-rw-r--r--src/H5MF.c6
-rw-r--r--src/H5MM.c2
-rw-r--r--src/H5O.c36
-rw-r--r--src/H5Oattr.c12
-rw-r--r--src/H5Ocomp.c14
-rw-r--r--src/H5Ocont.c6
-rw-r--r--src/H5Odtype.c21
-rw-r--r--src/H5Oefl.c19
-rw-r--r--src/H5Ofill.c39
-rw-r--r--src/H5Olayout.c12
-rw-r--r--src/H5Omtime.c13
-rw-r--r--src/H5Oname.c12
-rw-r--r--src/H5Osdspace.c14
-rw-r--r--src/H5Oshared.c8
-rw-r--r--src/H5Ostab.c14
-rw-r--r--src/H5P.c208
-rw-r--r--src/H5R.c10
-rw-r--r--src/H5S.c68
-rw-r--r--src/H5Sall.c36
-rw-r--r--src/H5Shyper.c58
-rw-r--r--src/H5Smpio.c6
-rw-r--r--src/H5Snone.c10
-rw-r--r--src/H5Spoint.c45
-rw-r--r--src/H5Sselect.c44
-rw-r--r--src/H5T.c195
-rw-r--r--src/H5TB.c34
-rw-r--r--src/H5Tbit.c3
-rw-r--r--src/H5Tconv.c391
-rw-r--r--src/H5Tvlen.c22
-rw-r--r--src/H5V.c22
-rw-r--r--src/H5Z.c11
-rw-r--r--src/H5Zdeflate.c2
-rw-r--r--src/H5detect.c2
-rw-r--r--src/H5private.h69
66 files changed, 1395 insertions, 1096 deletions
diff --git a/src/H5.c b/src/H5.c
index 5182383..10d1489 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -71,7 +71,7 @@ static int interface_initialize_g = 0;
herr_t
H5_init_library(void)
{
- FUNC_ENTER(H5_init_library, FAIL);
+ FUNC_ENTER_NOAPI(H5_init_library, FAIL);
/*
* Make sure the package information is updated.
@@ -291,7 +291,7 @@ H5garbage_collect(void)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER(H5garbage_collect, FAIL);
+ FUNC_ENTER_API(H5garbage_collect, FAIL);
/* Call the garbage collection routines in the library */
H5FL_garbage_coll();
@@ -335,7 +335,7 @@ H5set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim,
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER(H5set_free_list_limits, FAIL);
+ FUNC_ENTER_API(H5set_free_list_limits, FAIL);
/* Call the free list function to actually set the limits */
H5FL_set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim);
@@ -455,7 +455,7 @@ H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER(H5get_libversion, FAIL);
+ FUNC_ENTER_API(H5get_libversion, FAIL);
/* Set the version information */
if (majnum) *majnum = H5_VERS_MAJOR;
@@ -495,7 +495,7 @@ H5check_version (unsigned majnum, unsigned minnum, unsigned relnum)
char substr[] = H5_VERS_SUBRELEASE;
static int checked = 0;
- FUNC_ENTER_NOINIT(H5check_version);
+ FUNC_ENTER_API_NOINIT(H5check_version);
if (H5_VERS_MAJOR!=majnum || H5_VERS_MINOR!=minnum ||
H5_VERS_RELEASE!=relnum) {
@@ -562,7 +562,7 @@ H5check_version (unsigned majnum, unsigned minnum, unsigned relnum)
herr_t
H5open(void)
{
- FUNC_ENTER(H5open, FAIL);
+ FUNC_ENTER_API(H5open, FAIL);
/* all work is done by FUNC_ENTER() */
FUNC_LEAVE(SUCCEED);
}
@@ -590,7 +590,7 @@ H5close (void)
* thing just to release it all right away. It is safe to call this
* function for an uninitialized library.
*/
- FUNC_ENTER_NOINIT(H5close);
+ FUNC_ENTER_API_NOINIT(H5close);
H5_term_library();
diff --git a/src/H5A.c b/src/H5A.c
index 2f666a9..f95bb9b 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -159,7 +159,7 @@ H5Acreate(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
H5S_t *space = NULL;
hid_t ret_value = FAIL;
- FUNC_ENTER(H5Acreate, FAIL);
+ FUNC_ENTER_API(H5Acreate, FAIL);
H5TRACE5("i","isiii",loc_id,name,type_id,space_id,plist_id);
/* check arguments */
@@ -386,7 +386,7 @@ H5Aopen_name(hid_t loc_id, const char *name)
int idx=0;
hid_t ret_value = FAIL;
- FUNC_ENTER(H5Aopen_name, FAIL);
+ FUNC_ENTER_API(H5Aopen_name, FAIL);
H5TRACE2("i","is",loc_id,name);
/* check arguments */
@@ -449,7 +449,7 @@ H5Aopen_idx(hid_t loc_id, unsigned idx)
H5G_entry_t *ent = NULL; /*Symtab entry of object to attribute */
hid_t ret_value = FAIL;
- FUNC_ENTER(H5Aopen_idx, FAIL);
+ FUNC_ENTER_API(H5Aopen_idx, FAIL);
H5TRACE2("i","iIu",loc_id,idx);
/* check arguments */
@@ -557,7 +557,7 @@ H5Awrite(hid_t attr_id, hid_t type_id, const void *buf)
const H5T_t *mem_type = NULL;
herr_t ret_value = FAIL;
- FUNC_ENTER(H5Awrite, FAIL);
+ FUNC_ENTER_API(H5Awrite, FAIL);
H5TRACE3("e","iix",attr_id,type_id,buf);
/* check arguments */
@@ -711,7 +711,7 @@ H5Aread(hid_t attr_id, hid_t type_id, void *buf)
const H5T_t *mem_type = NULL;
herr_t ret_value = FAIL;
- FUNC_ENTER(H5Aread, FAIL);
+ FUNC_ENTER_API(H5Aread, FAIL);
H5TRACE3("e","iix",attr_id,type_id,buf);
/* check arguments */
@@ -856,7 +856,7 @@ H5Aget_space(hid_t attr_id)
H5S_t *dst = NULL;
hid_t ret_value = FAIL;
- FUNC_ENTER(H5Aget_space, FAIL);
+ FUNC_ENTER_API(H5Aget_space, FAIL);
H5TRACE1("i","i",attr_id);
/* check arguments */
@@ -913,7 +913,7 @@ H5Aget_type(hid_t attr_id)
H5T_t *dst = NULL;
hid_t ret_value = FAIL;
- FUNC_ENTER(H5Aget_type, FAIL);
+ FUNC_ENTER_API(H5Aget_type, FAIL);
H5TRACE1("i","i",attr_id);
/* check arguments */
@@ -983,7 +983,7 @@ H5Aget_name(hid_t attr_id, size_t buf_size, char *buf)
size_t copy_len, nbytes;
ssize_t ret_value = FAIL;
- FUNC_ENTER(H5Aget_name, FAIL);
+ FUNC_ENTER_API(H5Aget_name, FAIL);
H5TRACE3("Zs","izs",attr_id,buf_size,buf);
/* check arguments */
@@ -1041,7 +1041,7 @@ H5Aget_num_attrs(hid_t loc_id)
void *obj = NULL;
int ret_value = 0;
- FUNC_ENTER(H5Aget_num_attrs, FAIL);
+ FUNC_ENTER_API(H5Aget_num_attrs, FAIL);
H5TRACE1("Is","i",loc_id);
/* check arguments */
@@ -1132,7 +1132,7 @@ H5Aiterate(hid_t loc_id, unsigned *attr_num, H5A_operator_t op, void *op_data)
herr_t ret_value = 0;
int idx;
- FUNC_ENTER(H5Aiterate, FAIL);
+ FUNC_ENTER_API(H5Aiterate, FAIL);
H5TRACE4("e","i*Iuxx",loc_id,attr_num,op,op_data);
/* check arguments */
@@ -1203,7 +1203,7 @@ H5Adelete(hid_t loc_id, const char *name)
int idx=0, found=-1;
herr_t ret_value = FAIL;
- FUNC_ENTER(H5Aopen_name, FAIL);
+ FUNC_ENTER_API(H5Aopen_name, FAIL);
H5TRACE2("e","is",loc_id,name);
/* check arguments */
@@ -1269,7 +1269,7 @@ H5Adelete(hid_t loc_id, const char *name)
herr_t
H5Aclose(hid_t attr_id)
{
- FUNC_ENTER(H5Aclose, FAIL);
+ FUNC_ENTER_API(H5Aclose, FAIL);
H5TRACE1("e","i",attr_id);
/* check arguments */
@@ -1304,7 +1304,7 @@ H5A_copy(const H5A_t *old_attr)
{
H5A_t *new_attr=NULL;
- FUNC_ENTER(H5A_copy, NULL);
+ FUNC_ENTER_NOAPI(H5A_copy, NULL);
/* check args */
assert(old_attr);
@@ -1358,7 +1358,7 @@ H5A_copy(const H5A_t *old_attr)
herr_t
H5A_close(H5A_t *attr)
{
- FUNC_ENTER(H5A_close, FAIL);
+ FUNC_ENTER_NOAPI(H5A_close, FAIL);
assert(attr);
@@ -1421,7 +1421,7 @@ H5A_close(H5A_t *attr)
H5G_entry_t *
H5A_entof(H5A_t *attr)
{
- FUNC_ENTER(H5A_entof, NULL);
+ FUNC_ENTER_NOAPI(H5A_entof, NULL);
assert(attr);
FUNC_LEAVE(&(attr->ent));
}
diff --git a/src/H5AC.c b/src/H5AC.c
index 2849a23..e49c7bd 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -89,7 +89,8 @@ int
H5AC_create(H5F_t *f, int size_hint)
{
H5AC_t *cache = NULL;
- FUNC_ENTER(H5AC_create, FAIL);
+
+ FUNC_ENTER_NOAPI(H5AC_create, FAIL);
assert(f);
assert(NULL == f->shared->cache);
@@ -137,7 +138,8 @@ herr_t
H5AC_dest(H5F_t *f)
{
H5AC_t *cache = NULL;
- FUNC_ENTER(H5AC_dest, FAIL);
+
+ FUNC_ENTER_NOAPI(H5AC_dest, FAIL);
assert(f);
assert(f->shared->cache);
@@ -221,7 +223,7 @@ H5AC_find_f(H5F_t *f, const H5AC_class_t *type, haddr_t addr,
H5AC_info_t **info = NULL;
H5AC_t *cache = NULL;
- FUNC_ENTER(H5AC_find, NULL);
+ FUNC_ENTER_NOAPI(H5AC_find, NULL);
assert(f);
assert(f->shared->cache);
@@ -404,7 +406,7 @@ H5AC_flush(H5F_t *f, const H5AC_class_t *type, haddr_t addr, hbool_t destroy)
unsigned nslots;
H5AC_t *cache = NULL;
- FUNC_ENTER(H5AC_flush, FAIL);
+ FUNC_ENTER_NOAPI(H5AC_flush, FAIL);
assert(f);
assert(f->shared->cache);
@@ -536,7 +538,7 @@ H5AC_set(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing)
H5AC_info_t **info = NULL;
H5AC_t *cache = NULL;
- FUNC_ENTER(H5AC_set, FAIL);
+ FUNC_ENTER_NOAPI(H5AC_set, FAIL);
assert(f);
assert(f->shared->cache);
@@ -610,7 +612,7 @@ H5AC_rename(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr,
herr_t status;
H5AC_t *cache = NULL;
- FUNC_ENTER(H5AC_rename, FAIL);
+ FUNC_ENTER_NOAPI(H5AC_rename, FAIL);
assert(f);
assert(f->shared->cache);
@@ -720,7 +722,7 @@ H5AC_protect(H5F_t *f, const H5AC_class_t *type, haddr_t addr,
}
#endif
- FUNC_ENTER(H5AC_protect, NULL);
+ FUNC_ENTER_NOAPI(H5AC_protect, NULL);
/* check args */
assert(f);
@@ -836,7 +838,7 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing)
H5AC_t *cache = NULL;
H5AC_info_t **info = NULL;
- FUNC_ENTER(H5AC_unprotect, FAIL);
+ FUNC_ENTER_NOAPI(H5AC_unprotect, FAIL);
/* check args */
assert(f);
@@ -923,7 +925,7 @@ H5AC_debug(H5F_t UNUSED *f)
double miss_rate;
#endif
- FUNC_ENTER(H5AC_debug, FAIL);
+ FUNC_ENTER_NOAPI(H5AC_debug, FAIL);
#ifdef H5AC_DEBUG
if (H5DEBUG(AC)) {
diff --git a/src/H5B.c b/src/H5B.c
index 353a831..244efa6 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -196,7 +196,7 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata,
int i;
herr_t ret_value = FAIL;
- FUNC_ENTER(H5B_create, FAIL);
+ FUNC_ENTER_NOAPI(H5B_create, FAIL);
/*
* Check arguments.
@@ -311,7 +311,7 @@ H5B_Kvalue(H5F_t *f, const H5B_class_t *type)
int btree_k[H5B_NUM_BTREE_ID];
H5P_genplist_t *plist;
- FUNC_ENTER(H5B_Kvalue, FAIL);
+ FUNC_ENTER_NOAPI(H5B_Kvalue, FAIL);
assert(f);
assert(type);
@@ -356,7 +356,7 @@ H5B_load(H5F_t *f, haddr_t addr, const void *_type, void *udata)
uint8_t *p;
H5B_t *ret_value = NULL;
- FUNC_ENTER(H5B_load, NULL);
+ FUNC_ENTER_NOAPI(H5B_load, NULL);
/* Check arguments */
assert(f);
@@ -465,7 +465,7 @@ H5B_flush(H5F_t *f, hbool_t destroy, haddr_t addr, H5B_t *bt)
size_t size = 0;
uint8_t *p = bt->page;
- FUNC_ENTER(H5B_flush, FAIL);
+ FUNC_ENTER_NOAPI(H5B_flush, FAIL);
/*
* Check arguments.
@@ -576,7 +576,7 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
int idx = -1, lt = 0, rt, cmp = 1;
int ret_value = FAIL;
- FUNC_ENTER(H5B_find, FAIL);
+ FUNC_ENTER_NOAPI(H5B_find, FAIL);
/*
* Check arguments.
@@ -926,7 +926,7 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr,
H5B_ins_t my_ins = H5B_INS_ERROR;
herr_t ret_value = FAIL;
- FUNC_ENTER(H5B_insert, FAIL);
+ FUNC_ENTER_NOAPI(H5B_insert, FAIL);
/*
* Check arguments.
@@ -1579,7 +1579,7 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, H5B_operator_t op, haddr_t addr,
int i, nchildren;
herr_t ret_value = FAIL;
- FUNC_ENTER(H5B_iterate, FAIL);
+ FUNC_ENTER_NOAPI(H5B_iterate, FAIL);
/*
* Check arguments.
@@ -1698,7 +1698,8 @@ H5B_remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type,
size_t sizeof_rkey, sizeof_rec;
hsize_t sizeof_node;
- FUNC_ENTER(H5B_remove_helper, H5B_INS_ERROR);
+ FUNC_ENTER_NOAPI(H5B_remove_helper, H5B_INS_ERROR);
+
assert(f);
assert(H5F_addr_defined(addr));
assert(type);
@@ -1980,8 +1981,7 @@ H5B_remove(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
hbool_t rt_key_changed = FALSE; /*right key changed?*/
H5B_t *bt = NULL; /*btree node */
-
- FUNC_ENTER(H5B_remove, FAIL);
+ FUNC_ENTER_NOAPI(H5B_remove, FAIL);
/* Check args */
assert(f);
@@ -2046,7 +2046,7 @@ H5B_nodesize(H5F_t *f, const H5B_class_t *type,
{
size_t size;
- FUNC_ENTER(H5B_nodesize, (size_t) 0);
+ FUNC_ENTER_NOAPI(H5B_nodesize, (size_t) 0);
/*
* Check arguments.
@@ -2099,7 +2099,7 @@ H5B_copy(H5F_t *f, const H5B_t *old_bt)
size_t nkeys;
size_t u;
- FUNC_ENTER(H5B_copy, NULL);
+ FUNC_ENTER_NOAPI(H5B_copy, NULL);
/*
* Check arguments.
@@ -2173,7 +2173,7 @@ H5B_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
H5B_t *bt = NULL;
int i;
- FUNC_ENTER(H5B_debug, FAIL);
+ FUNC_ENTER_NOAPI(H5B_debug, FAIL);
/*
* Check arguments.
@@ -2280,7 +2280,8 @@ H5B_assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, void *udata)
struct child_t *next;
} *head = NULL, *tail = NULL, *prev = NULL, *cur = NULL, *tmp = NULL;
- FUNC_ENTER(H5B_assert, FAIL);
+ FUNC_ENTER_NOAPI(H5B_assert, FAIL);
+
if (0==ncalls++) {
if (H5DEBUG(B)) {
fprintf(H5DEBUG(B), "H5B: debugging B-trees (expensive)\n");
diff --git a/src/H5D.c b/src/H5D.c
index b9cc209..9700bc7 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -100,7 +100,7 @@ H5FL_BLK_DEFINE_STATIC(vlen_fl_buf);
herr_t
H5D_init(void)
{
- FUNC_ENTER(H5D_init, FAIL);
+ FUNC_ENTER_NOAPI(H5D_init, FAIL);
/* FUNC_ENTER() does all the work */
FUNC_LEAVE(SUCCEED);
}
@@ -400,7 +400,7 @@ H5D_crt_copy(hid_t new_plist_id, hid_t old_plist_id, void UNUSED *copy_data)
H5P_genplist_t *new_plist;
herr_t ret_value=SUCCEED;
- FUNC_ENTER(H5D_crt_copy, FAIL);
+ FUNC_ENTER_NOAPI(H5D_crt_copy, FAIL);
/* Verify property list ID */
if (TRUE!=H5P_isa_class(new_plist_id,H5P_DATASET_CREATE) || NULL == (new_plist = H5I_object(new_plist_id)))
@@ -477,7 +477,7 @@ H5D_crt_close(hid_t dcpl_id, void UNUSED *close_data)
H5P_genplist_t *plist; /* Property list */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER(H5D_crt_close, FAIL);
+ FUNC_ENTER_NOAPI(H5D_crt_close, FAIL);
/* Check arguments */
if (TRUE!=H5P_isa_class(dcpl_id,H5P_DATASET_CREATE) || NULL == (plist = H5I_object(dcpl_id)))
@@ -536,7 +536,7 @@ H5D_xfer_create(hid_t dxpl_id, void UNUSED *create_data)
H5P_genplist_t *plist; /* Property list */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER(H5D_xfer_create, FAIL);
+ FUNC_ENTER_NOAPI(H5D_xfer_create, FAIL);
/* Check arguments */
if (TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (plist = H5I_object(dxpl_id)))
@@ -592,7 +592,7 @@ H5D_xfer_copy(hid_t new_plist_id, hid_t UNUSED old_plist_id,
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER(H5D_xfer_copy, FAIL);
+ FUNC_ENTER_NOAPI(H5D_xfer_copy, FAIL);
if(H5D_xfer_create(new_plist_id, copy_data) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't copy property list");
@@ -630,7 +630,7 @@ H5D_xfer_close(hid_t dxpl_id, void UNUSED *close_data)
H5P_genplist_t *plist; /* Property list */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER(H5D_xfer_close, FAIL);
+ FUNC_ENTER_NOAPI(H5D_xfer_close, FAIL);
/* Check arguments */
if (TRUE!=H5P_isa_class(dxpl_id,H5P_DATASET_XFER) || NULL == (plist = H5I_object(dxpl_id)))
@@ -702,7 +702,7 @@ H5Dcreate(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
H5D_t *new_dset = NULL;
hid_t ret_value = FAIL;
- FUNC_ENTER(H5Dcreate, FAIL);
+ FUNC_ENTER_API(H5Dcreate, FAIL);
H5TRACE5("i","isiii",loc_id,name,type_id,space_id,plist_id);
/* Check arguments */
@@ -769,7 +769,7 @@ H5Dopen(hid_t loc_id, const char *name)
H5D_t *dataset = NULL; /*the dataset */
hid_t ret_value = FAIL;
- FUNC_ENTER(H5Dopen, FAIL);
+ FUNC_ENTER_API(H5Dopen, FAIL);
H5TRACE2("i","is",loc_id,name);
/* Check args */
@@ -819,7 +819,7 @@ H5Dclose(hid_t dset_id)
{
H5D_t *dset = NULL; /* dataset object to release */
- FUNC_ENTER(H5Dclose, FAIL);
+ FUNC_ENTER_API(H5Dclose, FAIL);
H5TRACE1("e","i",dset_id);
/* Check args */
@@ -865,7 +865,7 @@ H5Dget_space(hid_t dset_id)
H5S_t *space = NULL;
hid_t ret_value = FAIL;
- FUNC_ENTER (H5Dget_space, FAIL);
+ FUNC_ENTER_API(H5Dget_space, FAIL);
H5TRACE1("i","i",dset_id);
/* Check args */
@@ -912,7 +912,7 @@ H5D_get_space(H5D_t *dset)
{
H5S_t *space = NULL;
- FUNC_ENTER(H5D_get_space, NULL);
+ FUNC_ENTER_NOAPI(H5D_get_space, NULL);
assert(dset);
if (NULL==(space=H5S_read(&(dset->ent)))) {
@@ -945,7 +945,7 @@ herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation)
H5D_t *dset = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER(H5Dget_space_status, FAIL);
+ FUNC_ENTER_API(H5Dget_space_status, FAIL);
/* Check arguments */
if(H5I_DATASET != H5I_get_type(dset_id) || NULL==(dset=H5I_object(dset_id)))
@@ -1056,7 +1056,7 @@ H5Dget_type(hid_t dset_id)
H5T_t *copied_type = NULL;
hid_t ret_value = FAIL;
- FUNC_ENTER (H5Dget_type, FAIL);
+ FUNC_ENTER_API(H5Dget_type, FAIL);
H5TRACE1("i","i",dset_id);
/* Check args */
@@ -1123,7 +1123,7 @@ H5Dget_create_plist(hid_t dset_id)
H5P_genplist_t *new_plist;
hid_t ret_value = FAIL;
- FUNC_ENTER (H5Dget_create_plist, FAIL);
+ FUNC_ENTER_API(H5Dget_create_plist, FAIL);
H5TRACE1("i","i",dset_id);
/* Check args */
@@ -1204,7 +1204,7 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
const H5S_t *mem_space = NULL;
const H5S_t *file_space = NULL;
- FUNC_ENTER(H5Dread, FAIL);
+ FUNC_ENTER_API(H5Dread, FAIL);
H5TRACE6("e","iiiiix",dset_id,mem_type_id,mem_space_id,file_space_id,
plist_id,buf);
@@ -1302,7 +1302,7 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
const H5S_t *mem_space = NULL;
const H5S_t *file_space = NULL;
- FUNC_ENTER(H5Dwrite, FAIL);
+ FUNC_ENTER_API(H5Dwrite, FAIL);
H5TRACE6("e","iiiiix",dset_id,mem_type_id,mem_space_id,file_space_id,
plist_id,buf);
@@ -1377,7 +1377,7 @@ H5Dextend(hid_t dset_id, const hsize_t *size)
{
H5D_t *dset = NULL;
- FUNC_ENTER (H5Dextend, FAIL);
+ FUNC_ENTER_API(H5Dextend, FAIL);
H5TRACE2("e","i*h",dset_id,size);
/* Check args */
@@ -1398,11 +1398,6 @@ H5Dextend(hid_t dset_id, const hsize_t *size)
FUNC_LEAVE (SUCCEED);
}
-
-
-
-
-
/*-------------------------------------------------------------------------
* Function: H5D_new
@@ -1433,7 +1428,7 @@ H5D_new(hid_t dcpl_id)
H5P_genplist_t *plist; /* Property list created */
H5D_t *ret_value = NULL; /*return value */
- FUNC_ENTER(H5D_new, NULL);
+ FUNC_ENTER_NOAPI(H5D_new, NULL);
/* check args */
/* Nothing to check */
@@ -1530,7 +1525,7 @@ H5D_create(H5G_entry_t *loc, const char *name, const H5T_t *type,
H5P_genplist_t *plist; /* Property list */
H5P_genplist_t *new_plist; /* New Property list */
- FUNC_ENTER(H5D_create, NULL);
+ FUNC_ENTER_NOAPI(H5D_create, NULL);
/* check args */
assert (loc);
@@ -1836,7 +1831,8 @@ H5D_isa(H5G_entry_t *ent)
{
htri_t exists;
- FUNC_ENTER(H5D_isa, FAIL);
+ FUNC_ENTER_NOAPI(H5D_isa, FAIL);
+
assert(ent);
/* Data type */
@@ -1892,7 +1888,7 @@ H5D_open(H5G_entry_t *loc, const char *name)
H5D_t *ret_value = NULL; /*return value */
H5G_entry_t ent; /*dataset symbol table entry */
- FUNC_ENTER(H5D_open, NULL);
+ FUNC_ENTER_NOAPI(H5D_open, NULL);
/* check args */
assert (loc);
@@ -1952,7 +1948,7 @@ H5D_open_oid(H5G_entry_t *ent)
int chunk_ndims;
H5P_genplist_t *plist; /* Property list */
- FUNC_ENTER(H5D_open_oid, NULL);
+ FUNC_ENTER_NOAPI(H5D_open_oid, NULL);
/* check args */
assert (ent);
@@ -2125,7 +2121,7 @@ H5D_close(H5D_t *dataset)
{
unsigned free_failed;
- FUNC_ENTER(H5D_close, FAIL);
+ FUNC_ENTER_NOAPI(H5D_close, FAIL);
/* check args */
assert(dataset && dataset->ent.file);
@@ -2243,7 +2239,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
H5P_genplist_t *dc_plist; /* Dataset creation roperty list */
unsigned sconv_flags=0; /* Flags for the space conversion */
- FUNC_ENTER(H5D_read, FAIL);
+ FUNC_ENTER_NOAPI(H5D_read, FAIL);
/* check args */
assert(dataset && dataset->ent.file);
@@ -2657,7 +2653,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
H5P_genplist_t *dc_plist; /* Dataset creation roperty list */
unsigned sconv_flags=0; /* Flags for the space conversion */
- FUNC_ENTER(H5D_write, FAIL);
+ FUNC_ENTER_NOAPI(H5D_write, FAIL);
/* check args */
assert(dataset && dataset->ent.file);
@@ -3036,7 +3032,7 @@ H5D_extend (H5D_t *dataset, const hsize_t *size)
H5O_fill_t fill;
H5P_genplist_t *plist; /* Property list */
- FUNC_ENTER (H5D_extend, FAIL);
+ FUNC_ENTER_NOAPI(H5D_extend, FAIL);
/* Check args */
assert (dataset);
@@ -3135,9 +3131,12 @@ H5D_entof (H5D_t *dataset)
H5T_t *
H5D_typeof (H5D_t *dset)
{
- FUNC_ENTER (H5D_typeof, NULL);
+ /* Use FUNC_ENTER_NOINIT here to avoid performance issues */
+ FUNC_ENTER_NOINIT(H5D_typeof);
+
assert (dset);
assert (dset->type);
+
FUNC_LEAVE (dset->type);
}
@@ -3161,9 +3160,12 @@ H5D_typeof (H5D_t *dset)
H5F_t *
H5D_get_file (const H5D_t *dset)
{
- FUNC_ENTER (H5D_get_file, NULL);
+ /* Use FUNC_ENTER_NOINIT here to avoid performance issues */
+ FUNC_ENTER_NOINIT(H5D_get_file);
+
assert (dset);
assert (dset->ent.file);
+
FUNC_LEAVE (dset->ent.file);
}
@@ -3312,7 +3314,7 @@ H5Dget_storage_size(hid_t dset_id)
H5D_t *dset=NULL;
hsize_t size;
- FUNC_ENTER(H5Dget_storage_size, 0);
+ FUNC_ENTER_API(H5Dget_storage_size, 0);
H5TRACE1("h","i",dset_id);
/* Check args */
@@ -3348,7 +3350,7 @@ H5D_get_storage_size(H5D_t *dset)
unsigned u; /* Index variable */
hsize_t ret_value=0;
- FUNC_ENTER(H5D_get_storage_size, 0);
+ FUNC_ENTER_NOAPI(H5D_get_storage_size, 0);
if (H5D_CHUNKED==dset->layout.type) {
ret_value = H5F_istore_allocated(dset->ent.file, dset->layout.ndims,
@@ -3438,7 +3440,7 @@ H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op,
H5S_t *space = NULL;
herr_t ret_value=FAIL;
- FUNC_ENTER(H5Diterate, FAIL);
+ FUNC_ENTER_API(H5Diterate, FAIL);
H5TRACE5("e","xiixx",buf,type_id,space_id,op,operator_data);
/* Check args */
@@ -3480,7 +3482,7 @@ H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf)
{
herr_t ret_value=FAIL;
- FUNC_ENTER(H5Dvlen_reclaim, FAIL);
+ FUNC_ENTER_API(H5Dvlen_reclaim, FAIL);
H5TRACE4("e","iiix",type_id,space_id,plist_id,buf);
/* Check args */
@@ -3519,11 +3521,12 @@ H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf)
*
*-------------------------------------------------------------------------
*/
-void *H5D_vlen_get_buf_size_alloc(size_t size, void *info)
+void *
+H5D_vlen_get_buf_size_alloc(size_t size, void *info)
{
H5T_vlen_bufsize_t *vlen_bufsize=(H5T_vlen_bufsize_t *)info;
- FUNC_ENTER(H5D_vlen_get_buf_size_alloc, NULL);
+ FUNC_ENTER_NOAPI(H5D_vlen_get_buf_size_alloc, NULL);
/* Get a temporary pointer to space for the VL data */
if ((vlen_bufsize->vl_tbuf=H5FL_BLK_REALLOC(vlen_vl_buf,vlen_bufsize->vl_tbuf,size))!=NULL)
@@ -3567,7 +3570,7 @@ H5D_vlen_get_buf_size(void UNUSED *elem, hid_t type_id, hsize_t UNUSED ndim, hss
H5T_t *dt = NULL;
herr_t ret_value=FAIL;
- FUNC_ENTER(H5D_vlen_get_buf_size, FAIL);
+ FUNC_ENTER_NOAPI(H5D_vlen_get_buf_size, FAIL);
assert(op_data);
assert(H5I_DATATYPE == H5I_get_type(type_id));
@@ -3633,7 +3636,7 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
H5P_genplist_t *plist; /* Property list */
herr_t ret_value=FAIL;
- FUNC_ENTER(H5Dvlen_get_buf_size, FAIL);
+ FUNC_ENTER_API(H5Dvlen_get_buf_size, FAIL);
H5TRACE4("e","iii*h",dataset_id,type_id,space_id,size);
/* Check args */
@@ -3821,7 +3824,7 @@ H5Dfill(const void *fill, hid_t fill_type_id, void *buf, hid_t buf_type_id, hid_
H5T_t *buf_type; /* Buffer datatype */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER (H5Dfill, FAIL);
+ FUNC_ENTER_API(H5Dfill, FAIL);
H5TRACE5("e","xixii",fill,fill_type_id,buf,buf_type_id,space_id);
/* Check args */
@@ -3867,7 +3870,7 @@ H5Dset_extent(hid_t dset_id, const hsize_t *size)
{
H5D_t *dset = NULL;
- FUNC_ENTER(H5Dset_extent, FAIL);
+ FUNC_ENTER_API(H5Dset_extent, FAIL);
H5TRACE2("e","i*h",dset_id,size);
/* Check args */
@@ -3915,7 +3918,7 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size)
int u;
int shrink = 0;
- FUNC_ENTER(H5D_set_extent, FAIL);
+ FUNC_ENTER_NOAPI(H5D_set_extent, FAIL);
/* Check args */
assert(dset);
@@ -4022,7 +4025,7 @@ H5Ddebug(hid_t dset_id, unsigned UNUSED flags)
{
H5D_t *dset=NULL;
- FUNC_ENTER(H5Ddebug, FAIL);
+ FUNC_ENTER_API(H5Ddebug, FAIL);
H5TRACE2("e","iIu",dset_id,flags);
/* Check args */
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index e80a67f..a009de1 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -49,7 +49,7 @@ H5F_contig_read(H5F_t *f, hsize_t max_data, H5FD_mem_t type, haddr_t addr,
{
hsize_t offset=0; /* Offset for vector call */
- FUNC_ENTER(H5F_contig_read, FAIL);
+ FUNC_ENTER_NOAPI(H5F_contig_read, FAIL);
/* Check args */
assert(f);
@@ -85,7 +85,7 @@ H5F_contig_write(H5F_t *f, hsize_t max_data, H5FD_mem_t type, haddr_t addr, size
{
hsize_t offset=0; /* Offset for vector call */
- FUNC_ENTER(H5F_contig_write, FAIL);
+ FUNC_ENTER_NOAPI(H5F_contig_write, FAIL);
assert (f);
assert (buf);
@@ -139,7 +139,7 @@ H5F_contig_readv(H5F_t *f, hsize_t _max_data, H5FD_mem_t type, haddr_t _addr,
hsize_t *offset_arr_p; /* Pointer into the offset array */
#endif /* SLOW_WAY */
- FUNC_ENTER(H5F_contig_readv, FAIL);
+ FUNC_ENTER_NOAPI(H5F_contig_readv, FAIL);
/* Check args */
assert(f);
@@ -579,7 +579,7 @@ H5F_contig_writev(H5F_t *f, hsize_t _max_data, H5FD_mem_t type, haddr_t _addr,
hsize_t *offset_arr_p; /* Pointer into the offset array */
#endif /* SLOW_WAY */
- FUNC_ENTER(H5F_contig_writev, FAIL);
+ FUNC_ENTER_NOAPI(H5F_contig_writev, FAIL);
/* Check args */
assert(f);
diff --git a/src/H5Distore.c b/src/H5Distore.c