diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-11-16 01:01:37 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-11-16 01:01:37 (GMT) |
commit | 671187fd2b53c916f444e849a2fd57bac06552f8 (patch) | |
tree | a1a723b81dda3c967a597a9d7477806e4fcfa706 /src/H5E.c | |
parent | e70783203ab603627147c565d0fe08ddbe103981 (diff) | |
download | hdf5-671187fd2b53c916f444e849a2fd57bac06552f8.zip hdf5-671187fd2b53c916f444e849a2fd57bac06552f8.tar.gz hdf5-671187fd2b53c916f444e849a2fd57bac06552f8.tar.bz2 |
[svn-r11733] Purpose:
Code cleanup
Description:
Added some comments about the thread-specific memory for the error and
function stacks.
Changed H5close() to not use the function stack (since it causes it to
be re-enabled after shutting it down)
Changed thread-safe semaphore code to not use dynamicly allocated memory.
Platforms tested:
FreeBSD 4.11 (sleipnir)
Linux 2.4
Too minor to require h5committest
Diffstat (limited to 'src/H5E.c')
-rw-r--r-- | src/H5E.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -317,10 +317,18 @@ H5E_get_stack(void) if (!estack) { /* no associated value with current thread - create one */ estack = (H5E_t *)H5FL_MALLOC(H5E_t); + HDassert(estack); + + /* Set the thread-specific info */ estack->nused = 0; estack->new_api = TRUE; estack->u.func_stack = (H5E_auto_stack_t)H5Eprint_stack; estack->auto_data = NULL; + + /* (It's not necessary to release this in this API, it is + * released by the "key destructor" set up in the H5TS + * routines. See calls to pthread_key_create() in H5TS.c -QAK) + */ pthread_setspecific(H5TS_errstk_key_g, (void *)estack); } |