File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,7 @@ pdf_DATA = $(DOX_A4PDF) $(DOX_LETTERPDF)
253
253
# list of dependencies too.
254
254
255
255
man3_MANS = \
256
+ $(DOX_MAN_DIR ) /man3/hwlocality_api_error_reporting.3 \
256
257
$(DOX_MAN_DIR ) /man3/hwlocality_api_version.3 \
257
258
$(DOX_MAN_DIR ) /man3/HWLOC_API_VERSION.3 \
258
259
$(DOX_MAN_DIR ) /man3/hwloc_get_api_version.3
Original file line number Diff line number Diff line change @@ -77,6 +77,25 @@ extern "C" {
77
77
#endif
78
78
79
79
80
+ /** \defgroup hwlocality_api_error_reporting Error reporting in the API
81
+ * @{
82
+ * Most functions in the hwloc API return an integer value.
83
+ * Unless documentated differently, they return 0 on success
84
+ * and -1 on error.
85
+ * Functions that return a pointer type return \c NULL on error.
86
+ *
87
+ * \p errno will be set to a meaningful value whenever possible.
88
+ * This includes the usual \c EINVAL when invalid function parameters are passed
89
+ * or \c ENOMEM when an internal allocation fails.
90
+ * Some specific \c errno value are also used, for instance for binding
91
+ * errors as documented in \ref hwlocality_cpubinding.
92
+ *
93
+ * Some modules describe return values of their functions
94
+ * in their introduction, for instance in \ref hwlocality_bitmap.
95
+ * @}
96
+ */
97
+
98
+
80
99
/** \defgroup hwlocality_api_version API version
81
100
* @{
82
101
*/
Original file line number Diff line number Diff line change @@ -50,9 +50,10 @@ extern "C" {
50
50
* hwloc_bitmap_free(set);
51
51
* \endcode
52
52
*
53
- * \note Most functions below return an int that may be negative in case of
54
- * error. The usual error case would be an internal failure to realloc/extend
53
+ * \note Most functions below return 0 on success and -1 on error.
54
+ * The usual error case would be an internal failure to realloc/extend
55
55
* the storage of the bitmap (\p errno would be set to \c ENOMEM).
56
+ * See also \ref hwlocality_api_error_reporting.
56
57
*
57
58
* \note Several examples of using the bitmap API are available under the
58
59
* doc/examples/ directory in the source tree.
You can’t perform that action at this time.
0 commit comments