Skip to content

Commit 2b9b5f1

Browse files
committed
Fix documentation for zelCheckIsLoaderInTearDown
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
1 parent dbdd143 commit 2b9b5f1

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

source/lib/ze_lib.cpp

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -520,21 +520,16 @@ zelRegisterTeardownCallback(
520520
return result;
521521
}
522522

523-
/**
524-
* @brief Checks if the loader is in the process of tearing down.
525-
*
526-
* This function determines whether the loader is in a teardown state by
527-
* checking the destruction flag or the context pointer. If the loader is
528-
* dynamically loaded thru the static loader code path, then it performs
529-
* an additional stability check using a separate thread that could be killed.
530-
*
531-
* @return true if the loader is in teardown based on the stack variablrs
532-
* or the stability check fails; false otherwise.
533-
*
534-
* @note If the macro DYNAMIC_LOAD_LOADER is defined, a stability checker
535-
* thread is launched to perform additional checks. Any exceptions
536-
* or errors during this process are logged if debug tracing is enabled.
537-
*/
523+
/// @brief Checks if the Level Zero loader is currently in the teardown state.
524+
///
525+
/// This function determines whether the loader is in the process of being destroyed or is otherwise
526+
/// unavailable for further API calls. It performs several checks, including:
527+
/// - Whether the loader's destruction flag is set or the context is null.
528+
/// - On Windows with dynamic loading, it checks for loader teardown notifications,
529+
/// registration status, and the stability of the loader by attempting to call `loaderDriverGet`.
530+
/// - If any of these checks indicate the loader is in teardown or unstable, the function returns true.
531+
///
532+
/// @return true if the loader is in teardown or unstable; false otherwise.
538533
bool ZE_APICALL
539534
zelCheckIsLoaderInTearDown() {
540535
if (ze_lib::destruction || ze_lib::context == nullptr) {

0 commit comments

Comments
 (0)