diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-05-26 22:42:12 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-05-26 22:42:12 (GMT) |
commit | f824891a846ccd95bf059b986b3e7f9b12eab080 (patch) | |
tree | 5a9288740b565438a9b9a3d25dcae04319ff6cac /src/H5EAtest.c | |
parent | f4f4e9862410bccd9d87aa9388a7ff42d70582df (diff) | |
download | hdf5-f824891a846ccd95bf059b986b3e7f9b12eab080.zip hdf5-f824891a846ccd95bf059b986b3e7f9b12eab080.tar.gz hdf5-f824891a846ccd95bf059b986b3e7f9b12eab080.tar.bz2 |
[svn-r16982] Description:
Add library private routines to allow metadata cache entries to be set as
flush dependency children on extensible array entries. This will allow chunk
proxies to be set as child flush dependencies for the extensible array, adding
another necessary layer to the flush dependency chain for SWMR access.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.6 (amazon) in debug mode
Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5EAtest.c')
-rw-r--r-- | src/H5EAtest.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/H5EAtest.c b/src/H5EAtest.c index 93cd518..12d14ae 100644 --- a/src/H5EAtest.c +++ b/src/H5EAtest.c @@ -57,6 +57,7 @@ /* Callback context */ typedef struct H5EA__test_ctx_t { uint32_t bogus; /* Placeholder field to verify that context is working */ + H5EA__ctx_cb_t *cb; /* Pointer to context's callback action */ } H5EA__test_ctx_t; /********************/ @@ -126,10 +127,11 @@ H5FL_DEFINE_STATIC(H5EA__test_ctx_t); */ BEGIN_FUNC(STATIC, ERR, void *, NULL, NULL, -H5EA__test_crt_context(void UNUSED *udata)) +H5EA__test_crt_context(void *_udata)) /* Local variables */ H5EA__test_ctx_t *ctx; /* Context for callbacks */ + H5EA__ctx_cb_t *udata = (H5EA__ctx_cb_t *)_udata; /* User data for context */ /* Sanity checks */ @@ -139,6 +141,7 @@ H5EA__test_crt_context(void UNUSED *udata)) /* Initialize the context */ ctx->bogus = H5EA__TEST_BOGUS_VAL; + ctx->cb = udata; /* Set return value */ ret_value = ctx; @@ -219,8 +222,8 @@ END_FUNC(STATIC) /* end H5EA__test_fill() */ * *------------------------------------------------------------------------- */ -BEGIN_FUNC(STATIC, NOERR, -herr_t, SUCCEED, -, +BEGIN_FUNC(STATIC, ERR, +herr_t, SUCCEED, FAIL, H5EA__test_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)) /* Local variables */ @@ -233,6 +236,12 @@ H5EA__test_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)) HDassert(nelmts); HDassert(H5EA__TEST_BOGUS_VAL == ctx->bogus); + /* Check for callback action */ + if(ctx->cb) { + if((*ctx->cb->encode)(elmt, nelmts, ctx->cb->udata) < 0) + H5E_THROW(H5E_BADVALUE, "extensible array testing callback action failed") + } /* end if */ + /* Encode native elements into raw elements */ while(nelmts) { /* Encode element */ @@ -246,6 +255,8 @@ H5EA__test_encode(void *raw, const void *_elmt, size_t nelmts, void *_ctx)) nelmts--; } /* end while */ +CATCH + END_FUNC(STATIC) /* end H5EA__test_encode() */ |