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)
253253# list of dependencies too.
254254
255255man3_MANS = \
256+ $(DOX_MAN_DIR ) /man3/hwlocality_api_error_reporting.3 \
256257 $(DOX_MAN_DIR ) /man3/hwlocality_api_version.3 \
257258 $(DOX_MAN_DIR ) /man3/HWLOC_API_VERSION.3 \
258259 $(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" {
7777#endif
7878
7979
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+
8099/** \defgroup hwlocality_api_version API version
81100 * @{
82101 */
Original file line number Diff line number Diff line change @@ -50,9 +50,10 @@ extern "C" {
5050 * hwloc_bitmap_free(set);
5151 * \endcode
5252 *
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
5555 * the storage of the bitmap (\p errno would be set to \c ENOMEM).
56+ * See also \ref hwlocality_api_error_reporting.
5657 *
5758 * \note Several examples of using the bitmap API are available under the
5859 * doc/examples/ directory in the source tree.
You can’t perform that action at this time.
0 commit comments