Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/hotspot/share/runtime/mountUnmountDisabler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "prims/jvmtiThreadState.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaThread.hpp"
#include "runtime/jniHandles.hpp"
#include "runtime/mountUnmountDisabler.hpp"
#include "runtime/threadSMR.hpp"

Expand Down Expand Up @@ -193,6 +194,13 @@ void MountUnmountDisabler::end_transition(JavaThread* current, oop vthread, bool
}
}

// disable transitions for one virtual thread
// disable transitions for all threads if thread is nullptr or a platform thread
MountUnmountDisabler::MountUnmountDisabler(jthread thread)
: MountUnmountDisabler(JNIHandles::resolve_external_guard(thread))
{
}

// disable transitions for one virtual thread
// disable transitions for all threads if thread is nullptr or a platform thread
MountUnmountDisabler::MountUnmountDisabler(oop thread_oop)
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/runtime/mountUnmountDisabler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class MountUnmountDisabler : public AnyObj {
public:
MountUnmountDisabler(bool exlusive = false);
MountUnmountDisabler(oop thread_oop);
MountUnmountDisabler(jthread thread);
~MountUnmountDisabler();

static int global_vthread_transition_disable_count();
Expand Down