File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed
plugins-nextgen/common/include Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,6 @@ struct __tgt_async_info {
7878 llvm::SmallVector<void *, 2 > AssociatedAllocations;
7979
8080 // / Mutex to guard access to AssociatedAllocations and the Queue.
81- // / This is only used for liboffload and should be ignored in libomptarget
82- // / code.
8381 std::mutex Mutex;
8482
8583 // / The kernel launch environment used to issue a kernel. Stored here to
Original file line number Diff line number Diff line change @@ -488,7 +488,8 @@ Error olSyncQueue_impl(ol_queue_handle_t Queue) {
488488 // on it, but we have nothing to synchronize in that situation anyway.
489489 if (Queue->AsyncInfo ->Queue ) {
490490 // We don't need to release the queue and we would like the ability for
491- // other offload threads to submit work concurrently, so pass "false" here.
491+ // other offload threads to submit work concurrently, so pass "false" here
492+ // so we don't release the underlying queue object.
492493 if (auto Err = Queue->Device ->Device ->synchronize (Queue->AsyncInfo , false ))
493494 return Err;
494495 }
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ struct AsyncInfoWrapperTy {
153153 // / Register \p Ptr as an associated allocation that is freed after
154154 // / finalization.
155155 void freeAllocationAfterSynchronization (void *Ptr) {
156- std::lock_guard<std::mutex> AllocationGuard{ AsyncInfoPtr->Mutex } ;
156+ std::lock_guard<std::mutex> AllocationGuard ( AsyncInfoPtr->Mutex ) ;
157157 AsyncInfoPtr->AssociatedAllocations .push_back (Ptr);
158158 }
159159
You can’t perform that action at this time.
0 commit comments