summaryrefslogtreecommitdiffstats
path: root/src/H5E.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-06-19 21:49:01 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-06-19 21:49:01 (GMT)
commit1fdcafdc893c22fd61b85b22c4b53c76a9090fd1 (patch)
tree5593a43ac8c9e363bdb31b45b7f159da9e42a4e1 /src/H5E.c
parent09676ded1f6e9480e5154c8dcdf6a0226755d28b (diff)
downloadhdf5-1fdcafdc893c22fd61b85b22c4b53c76a9090fd1.zip
hdf5-1fdcafdc893c22fd61b85b22c4b53c76a9090fd1.tar.gz
hdf5-1fdcafdc893c22fd61b85b22c4b53c76a9090fd1.tar.bz2
[svn-r4022] Purpose:
Code Cleanup Description: Changed POSIX function calls to the HD* way of doing things. Checked with checkposix and tested on Linux. Platforms tested: Linux
Diffstat (limited to 'src/H5E.c')
-rw-r--r--src/H5E.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/H5E.c b/src/H5E.c
index 33577be..64b908d 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -193,19 +193,19 @@ void *H5E_auto_data_g = NULL;
*
*-------------------------------------------------------------------------
*/
-H5E_t *H5E_get_stack() {
- H5E_t *estack;
+H5E_t *H5E_get_stack(void)
+{
+ H5E_t *estack = pthread_getspecific(H5TS_errstk_key_g);
+
+ if (!estack) {
+ /* no associated value with current thread - create one */
+ estack = (H5E_t *)H5MM_malloc(sizeof(H5E_t));
+ pthread_setspecific(H5TS_errstk_key_g, (void *)estack);
+ }
- if ((estack = pthread_getspecific(H5TS_errstk_key_g))!=NULL) {
- return estack;
- } else {
- /* no associated value with current thread - create one */
- estack = (H5E_t *)malloc(sizeof(H5E_t));
- pthread_setspecific(H5TS_errstk_key_g, (void *)estack);
return estack;
- }
}
-#endif
+#endif /* H5_HAVE_THREADSAFE */
/*-------------------------------------------------------------------------