diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-04-12 21:41:23 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-04-12 21:41:23 (GMT) |
commit | 6151c1cd90aff639f66de06ec419cf49e49581de (patch) | |
tree | 2b744bdd17dc108d4bc212238c1df580796c88c4 | |
parent | c8f12172f17ee14b024e5367c57fad83183d7ed5 (diff) | |
download | hdf5-6151c1cd90aff639f66de06ec419cf49e49581de.zip hdf5-6151c1cd90aff639f66de06ec419cf49e49581de.tar.gz hdf5-6151c1cd90aff639f66de06ec419cf49e49581de.tar.bz2 |
[svn-r13650] Description:
Clean up problems from error handling API changes in parallel and
threadsafe builds.
Tested on:
FreeBSD/64 6.2 (liberty) w/parallel & threadsafe
-rw-r--r-- | src/H5ACpkg.h | 4 | ||||
-rw-r--r-- | src/H5E.c | 4 | ||||
-rw-r--r-- | test/ttsafe_error.c | 14 | ||||
-rw-r--r-- | testpar/t_pflush2.c | 8 |
4 files changed, 13 insertions, 17 deletions
diff --git a/src/H5ACpkg.h b/src/H5ACpkg.h index b965a26..973f988 100644 --- a/src/H5ACpkg.h +++ b/src/H5ACpkg.h @@ -44,10 +44,6 @@ #include "H5Cpkg.h" /* Cache */ #include "H5SLprivate.h" /* Skip lists */ -#ifdef H5_HAVE_PARALLEL -#include <mpi.h> -#endif /* H5_HAVE_PARALLEL */ - #define H5AC_DEBUG_DIRTY_BYTES_CREATION 0 @@ -304,7 +304,7 @@ H5E_term_interface(void) * *------------------------------------------------------------------------- */ -static H5E_t * +H5E_t * H5E_get_stack(void) { H5E_t *estack; @@ -321,7 +321,7 @@ H5E_get_stack(void) /* Set the thread-specific info */ estack->nused = 0; estack->new_api = TRUE; - estack->u.func_stack = (H5E_auto2_t)H5Eprint2; + estack->u.func2 = (H5E_auto2_t)H5Eprint2; estack->auto_data = NULL; /* (It's not necessary to release this in this API, it is diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index 5b74e4d..657b68b 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -56,7 +56,7 @@ #define WRITE_NUMBER 37 static herr_t error_callback(hid_t , void *); -static herr_t walk_error_callback(unsigned, const H5E_error_stack_t *, void *); +static herr_t walk_error_callback(unsigned, const H5E_error2_t *, void *); static void *tts_error_thread(void *); /* Global variables */ @@ -163,16 +163,16 @@ void *tts_error_thread(void UNUSED *arg) { hid_t dataspace, datatype, dataset; hsize_t dimsf[1]; /* dataset dimensions */ - H5E_auto_stack_t old_error_cb; + H5E_auto2_t old_error_cb; void *old_error_client_data; int value; int ret; /* preserve previous error stack handler */ - H5Eget_auto_stack(H5E_DEFAULT, &old_error_cb, &old_error_client_data); + H5Eget_auto2(H5E_DEFAULT, &old_error_cb, &old_error_client_data); /* set each thread's error stack handler */ - H5Eset_auto_stack(H5E_DEFAULT, error_callback, NULL); + H5Eset_auto2(H5E_DEFAULT, error_callback, NULL); /* define dataspace for dataset */ dimsf[0] = 1; @@ -198,7 +198,7 @@ void *tts_error_thread(void UNUSED *arg) assert(ret>=0); /* turn our error stack handler off */ - H5Eset_auto_stack(H5E_DEFAULT, old_error_cb, old_error_client_data); + H5Eset_auto2(H5E_DEFAULT, old_error_cb, old_error_client_data); return NULL; } @@ -213,11 +213,11 @@ herr_t error_callback(hid_t estack_id, void *client_data) error_count++; ret=pthread_mutex_unlock(&error_mutex); assert(ret==0); - return H5Ewalk_stack(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, client_data); + return H5Ewalk2(H5E_DEFAULT, H5E_WALK_DOWNWARD, walk_error_callback, client_data); } static -herr_t walk_error_callback(unsigned n, const H5E_error_stack_t *err_desc, void UNUSED *client_data) +herr_t walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void UNUSED *client_data) { hid_t maj_num, min_num; diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index 6500a27..5c3326b 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -132,7 +132,7 @@ int main(int argc, char* argv[]) { hid_t fapl1, fapl2; - H5E_auto_stack_t func; + H5E_auto2_t func; char name[1024]; const char *envval = NULL; @@ -176,8 +176,8 @@ main(int argc, char* argv[]) * so we turn off the error stack temporarily */ if(mpi_rank == 0) TESTING("H5Fflush (part2 without flush)"); - H5Eget_auto_stack(H5E_DEFAULT,&func,NULL); - H5Eset_auto_stack(H5E_DEFAULT, NULL, NULL); + H5Eget_auto2(H5E_DEFAULT,&func,NULL); + H5Eset_auto2(H5E_DEFAULT, NULL, NULL); h5_fixname(FILENAME[1], fapl2, name, sizeof name); if(check_file(name, fapl2)) @@ -192,7 +192,7 @@ main(int argc, char* argv[]) H5_FAILED() goto error; } - H5Eset_auto_stack(H5E_DEFAULT, func, NULL); + H5Eset_auto2(H5E_DEFAULT, func, NULL); h5_cleanup(&FILENAME[0], fapl1); |