Skip to content

Commit 646037d

Browse files
author
Serguei Spitsyn
committed
8374233: Overloaded constructor MountUnmountDisabler(jthread thread) is missed
Reviewed-by: amenkov, cjplummer, lmesnik Backport-of: f5249db
1 parent 535e8be commit 646037d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/hotspot/share/runtime/mountUnmountDisabler.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "prims/jvmtiThreadState.inline.hpp"
2929
#include "runtime/handles.inline.hpp"
3030
#include "runtime/javaThread.hpp"
31+
#include "runtime/jniHandles.hpp"
3132
#include "runtime/mountUnmountDisabler.hpp"
3233
#include "runtime/threadSMR.hpp"
3334

@@ -193,6 +194,13 @@ void MountUnmountDisabler::end_transition(JavaThread* current, oop vthread, bool
193194
}
194195
}
195196

197+
// disable transitions for one virtual thread
198+
// disable transitions for all threads if thread is nullptr or a platform thread
199+
MountUnmountDisabler::MountUnmountDisabler(jthread thread)
200+
: MountUnmountDisabler(JNIHandles::resolve_external_guard(thread))
201+
{
202+
}
203+
196204
// disable transitions for one virtual thread
197205
// disable transitions for all threads if thread is nullptr or a platform thread
198206
MountUnmountDisabler::MountUnmountDisabler(oop thread_oop)

src/hotspot/share/runtime/mountUnmountDisabler.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class MountUnmountDisabler : public AnyObj {
5858
public:
5959
MountUnmountDisabler(bool exlusive = false);
6060
MountUnmountDisabler(oop thread_oop);
61+
MountUnmountDisabler(jthread thread);
6162
~MountUnmountDisabler();
6263

6364
static int global_vthread_transition_disable_count();

0 commit comments

Comments
 (0)