Skip to content

Commit

Permalink
Fix ZUnlocker
Browse files Browse the repository at this point in the history
  • Loading branch information
lgxbslgx committed May 5, 2024
1 parent 8f8c349 commit 460718c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/z/zLock.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ template <typename T>
inline ZUnlocker<T>::ZUnlocker(T* lock)
: _lock(lock) {
if (_lock != nullptr) {
_lock->lock();
_lock->unlock();
}
}

template <typename T>
inline ZUnlocker<T>::~ZUnlocker() {
if (_lock != nullptr) {
_lock->unlock();
_lock->lock();
}
}

Expand Down

0 comments on commit 460718c

Please sign in to comment.