Fix for ATT context stop while packets are being processed (#171)

Fix for context stop while packets are being processed

Co-authored-by: Giovanni Baraldi <gbaraldi@amd.com>
这个提交包含在:
Baraldi, Giovanni和Giovanni Baraldi 编写, GitHub 于 2025-01-29 11:06:32 -08:00 提交
1 父节点 35f8374e35
当前提交 39db6d842f
1 个文件已更改
+2 -2
@@ -456,6 +456,8 @@ DispatchThreadTracer::start_context()
void
DispatchThreadTracer::stop_context() // NOLINT(readability-convert-member-functions-to-static)
{
CHECK_NOTNULL(hsa::get_queue_controller())->disable_serialization();
client.wlock([&](auto& client_id) {
if(!client_id) return;
@@ -463,8 +465,6 @@ DispatchThreadTracer::stop_context() // NOLINT(readability-convert-member-funct
CHECK_NOTNULL(hsa::get_queue_controller())->remove_callback(*client_id);
client_id = std::nullopt;
});
CHECK_NOTNULL(hsa::get_queue_controller())->disable_serialization();
}
void