Skip to content
Closed
Changes from 1 commit
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
7 changes: 3 additions & 4 deletions src/hotspot/share/runtime/lightweightSynchronizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ void LightweightSynchronizer::exit(oop object, BasicLock* lock, JavaThread* curr
monitor->exit(current);
}

// LightweightSynchronizer::inflate_locked_or_imse is used to to get an
// LightweightSynchronizer::inflate_locked_or_imse is used to get an
// inflated ObjectMonitor* from contexts which require that, such as
// notify/wait and jni_exit. Lightweight locking keeps the invariant that it
// only inflates if it is already locked by the current thread or the current
Expand Down Expand Up @@ -817,9 +817,8 @@ ObjectMonitor* LightweightSynchronizer::inflate_locked_or_imse(oop obj, ObjectSy

ObjectMonitor* LightweightSynchronizer::inflate_into_object_header(oop object, ObjectSynchronizer::InflateCause cause, JavaThread* locking_thread, Thread* current) {

// The JavaThread* locking parameter requires that the
// locking_thread == JavaThread::current, or is suspended throughout
// the call by some other mechanism.
// The JavaThread* locking parameter requires that the locking_thread == JavaThread::current,
// or is suspended throughout the call by some other mechanism.
// Even with lightweight locking the thread might be nullptr when called from a non
// JavaThread. (As may still be the case from FastHashCode). However it is only
// important for the correctness of the lightweight locking algorithm that the thread
Expand Down