RFR: 8256383: PlatformMutex::try_lock has different semantics on Windows and Posix

Thomas Stüfe thomas.stuefe at gmail.com
Tue Nov 17 09:04:33 UTC 2020


>
> > src/hotspot/share/runtime/mutex.cpp line 147:
> >
> >> 145:   // safepoint state, but can check blocking state.
> >> 146:   check_block_state(self);
> >> 147:   if (_owner == NULL && _lock.try_lock()) {
> >
> > `_owner != self` may be a bit clearer, at the expense of maybe
> unnecessarily calling into platform code (but before, we did that
> unconditionally).
>
> Right - see my response to Stefan.
>
>
Thank you, I feel more settled now. :)

Thomas


More information about the hotspot-runtime-dev mailing list