Skip to content

Commit e20fefc

Browse files
authored
[SYCL][CUDA] reverted #6577 (#6603)
reverted unnecessary mutex Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
1 parent 0c051a8 commit e20fefc

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

sycl/plugins/cuda/pi_cuda.hpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,9 @@ struct _pi_context {
201201

202202
bool is_primary() const noexcept { return kind_ == kind::primary; }
203203

204-
pi_uint32 increment_reference_count() noexcept {
205-
std::lock_guard<std::mutex> guard(mutex_);
206-
return ++refCount_;
207-
}
204+
pi_uint32 increment_reference_count() noexcept { return ++refCount_; }
208205

209-
pi_uint32 decrement_reference_count() noexcept {
210-
std::lock_guard<std::mutex> guard(mutex_);
211-
return --refCount_;
212-
}
206+
pi_uint32 decrement_reference_count() noexcept { return --refCount_; }
213207

214208
pi_uint32 get_reference_count() const noexcept { return refCount_; }
215209

0 commit comments

Comments
 (0)