From c79bc5fb2299b3c5c249eb276ab3ffa923fe3a66 Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Fri, 16 Apr 2021 15:17:52 -0400 Subject: [PATCH] Update documentation of hsa_ven_amd_loader_iterate_executables Clarify behavior of hsa_ven_amd_loader_iterate_executables during concurrent calls of executable creation and destruction. Change-Id: Idc3e3981d4fcc0d58d9f1b7a7578deed20aa490b [ROCm/ROCR-Runtime commit: 1bdc2f68544b389fee2069b6fbf002f910971dff] --- .../runtime/hsa-runtime/inc/hsa_ven_amd_loader.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ven_amd_loader.h b/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ven_amd_loader.h index 3ee0e332e3..47236c86e9 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ven_amd_loader.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ven_amd_loader.h @@ -495,13 +495,18 @@ hsa_ven_amd_loader_code_object_reader_create_from_file_with_offset_size( /** * @brief Iterate over the available executables, and invoke an - * application-defined callback on every iteration. + * application-defined callback on every iteration. While + * ::hsa_ven_amd_loader_iterate_executables is executing any calls to + * ::hsa_executable_create, ::hsa_executable_create_alt, or + * ::hsa_executable_destroy will be blocked. * * @param[in] callback Callback to be invoked once per executable. The HSA * runtime passes two arguments to the callback: the executable and the * application data. If @p callback returns a status other than * ::HSA_STATUS_SUCCESS for a particular iteration, the traversal stops and - * ::hsa_ven_amd_loader_iterate_executables returns that status value. + * ::hsa_ven_amd_loader_iterate_executables returns that status value. If + * @p callback invokes ::hsa_executable_create, ::hsa_executable_create_alt, or + * ::hsa_executable_destroy then the behavior is undefined. * * @param[in] data Application data that is passed to @p callback on every * iteration. May be NULL.