Skip to content

Commit 477131d

Browse files
committed
cblas: clarify XERBLA handler lifetime
1 parent 03cfefc commit 477131d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

cblas.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ typedef void (*openblas_dojob_callback)(int thread_num, void *jobdata, int dojob
5959
typedef void (*openblas_threads_callback)(int sync, openblas_dojob_callback dojob, int numjobs, size_t jobdata_elsize, void *jobdata, int dojob_data);
6060
void openblas_set_threads_callback_function(openblas_threads_callback callback);
6161

62-
/* Set the process-wide error handler called by XERBLA. The callback's routine
63-
* name is valid for name_length bytes and is not necessarily NUL-terminated.
64-
* Installation is thread-safe, returns the previous handler, and accepts NULL
65-
* to restore OpenBLAS' default handler. */
62+
/* Replace the XERBLA handler for this OpenBLAS instance and return the
63+
* previous handler. Passing NULL restores the default. Callbacks may run
64+
* concurrently and must be thread-safe. The name and info pointers are valid
65+
* only during the callback; name spans name_length bytes and need not be
66+
* NUL-terminated. Replacement is thread-safe but does not wait for in-flight
67+
* calls, so the previous handler must remain loaded until they complete. */
6668
#ifndef OPENBLAS_XERBLA_HANDLER_DEFINED
6769
#define OPENBLAS_XERBLA_HANDLER_DEFINED
6870
typedef void (*openblas_xerbla_handler)(const char *name,

0 commit comments

Comments
 (0)