RFR: 8339540: Unify include requirements for PlatformMonitor/Mutex constructors/destructors

Coleen Phillimore coleenp at openjdk.org
Wed Sep 4 15:08:23 UTC 2024


On Wed, 4 Sep 2024 13:37:46 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> Today, if you write code that, potentially implicitly, calls a the `PlatformMonitor` destructor you need to include `os.inline.hpp` to get it to compile on Windows but you don't need to do that for "posix" platforms.
> 
> That's because the destructor is located in `os_posix.cpp` for "posix" and `os_windows.inline.hpp` for Windows.
> 
> This leads to the situation that you can get everything to compile on Linux, just for it to fail linking when you later build it on Windows. I propose that we simplify this and move the constructors and destructors to the cpp files.

This seems trivial.

-------------

Marked as reviewed by coleenp (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20851#pullrequestreview-2280507932


More information about the hotspot-runtime-dev mailing list