summaryrefslogtreecommitdiffstats
path: root/src/H5Epkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-04-12 01:59:45 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-04-12 01:59:45 (GMT)
commitd6bb18abbc2d6e145afff18446a0814403f1a3b7 (patch)
tree8a340ebde9f0fea052c3d40b6e98f2d0ca7f7aaa /src/H5Epkg.h
parentde71a7fe74ca0954efec963066e2606d798691f4 (diff)
downloadhdf5-d6bb18abbc2d6e145afff18446a0814403f1a3b7.zip
hdf5-d6bb18abbc2d6e145afff18446a0814403f1a3b7.tar.gz
hdf5-d6bb18abbc2d6e145afff18446a0814403f1a3b7.tar.bz2
[svn-r13648] Description:
Rename new error handling API routines from H5E<foo>_stack() to H5E<foo>2(). Tested on: Mac OS X/32 10.4.9 (amazon) FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty)
Diffstat (limited to 'src/H5Epkg.h')
-rw-r--r--src/H5Epkg.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/src/H5Epkg.h b/src/H5Epkg.h
new file mode 100644
index 0000000..5e36b38
--- /dev/null
+++ b/src/H5Epkg.h
@@ -0,0 +1,105 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Wednesday, April 11, 2007
+ *
+ * Purpose: This file contains declarations which are visible only within
+ * the H5E package. Source files outside the H5E package should
+ * include H5Eprivate.h instead.
+ */
+#ifndef H5E_PACKAGE
+#error "Do not include this file outside the H5E package!"
+#endif
+
+#ifndef _H5Epkg_H
+#define _H5Epkg_H
+
+/* Get package's private header */
+#include "H5Eprivate.h"
+
+/* Other private headers needed by this file */
+
+
+/**************************/
+/* Package Private Macros */
+/**************************/
+
+/* Amount to indent each error */
+#define H5E_INDENT 2
+
+#ifdef H5_HAVE_THREADSAFE
+/*
+ * The per-thread error stack. pthread_once() initializes a special
+ * key that will be used by all threads to create a stack specific to
+ * each thread individually. The association of stacks to threads will
+ * be handled by the pthread library.
+ *
+ * In order for this macro to work, H5E_get_my_stack() must be preceeded
+ * by "H5E_t *estack =".
+ */
+#define H5E_get_my_stack() H5E_get_stack()
+#else /* H5_HAVE_THREADSAFE */
+/*
+ * The current error stack.
+ */
+#define H5E_get_my_stack() (H5E_stack_g + 0)
+#endif /* H5_HAVE_THREADSAFE */
+
+
+/****************************/
+/* Package Private Typedefs */
+/****************************/
+
+/* Some syntactic sugar to make the compiler happy with two different kinds of callbacks */
+typedef union {
+ H5E_auto_t efunc; /* Old-style callback, NO error stack param. */
+ H5E_auto2_t efunc2; /* New-style callback, with error stack param. */
+} H5E_auto_op_t;
+
+
+/*****************************/
+/* Package Private Variables */
+/*****************************/
+
+#ifndef H5_HAVE_THREADSAFE
+/*
+ * The current error stack.
+ */
+H5_DLLVAR H5E_t H5E_stack_g[1];
+#endif /* H5_HAVE_THREADSAFE */
+
+
+/******************************/
+/* Package Private Prototypes */
+/******************************/
+#ifdef H5_HAVE_THREADSAFE
+H5_DLL H5E_t *H5E_get_stack(void);
+#endif /* H5_HAVE_THREADSAFE */
+H5_DLL ssize_t H5E_get_msg(const H5E_msg_t *msg_ptr, H5E_type_t *type,
+ char *msg, size_t size);
+H5_DLL herr_t H5E_print2(const H5E_t *estack, FILE *stream, hbool_t bk_compat);
+H5_DLL herr_t H5E_walk2(const H5E_t *estack, H5E_direction_t direction,
+ H5E_walk_t func, H5E_walk2_t stack_func, hbool_t bk_compatible,
+ void *client_data);
+H5_DLL herr_t H5E_get_auto2(const H5E_t *estack, hbool_t new_api,
+ H5E_auto_op_t *func, void **client_data);
+H5_DLL herr_t H5E_set_auto2(H5E_t *estack, hbool_t new_api,
+ H5E_auto_op_t *func, void *client_data);
+H5_DLL herr_t H5E_pop(H5E_t *err_stack, size_t count);
+
+#endif /* _H5HFpkg_H */
+