mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-29 14:52:52 +00:00
8232534: Shenandoah: guard against reentrant ShenandoahHeapLock locking
Reviewed-by: rkennke
This commit is contained in:
parent
2324892e0b
commit
86f50ba1ef
@ -41,6 +41,9 @@ public:
|
||||
ShenandoahLock() : _state(unlocked), _owner(NULL) {};
|
||||
|
||||
void lock() {
|
||||
#ifdef ASSERT
|
||||
assert(_owner != Thread::current(), "reentrant locking attempt, would deadlock");
|
||||
#endif
|
||||
Thread::SpinAcquire(&_state, "Shenandoah Heap Lock");
|
||||
#ifdef ASSERT
|
||||
assert(_state == locked, "must be locked");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user