Integrated: 8339540: Unify include requirements for PlatformMonitor/Mutex constructors/destructors
Stefan Karlsson
stefank at openjdk.org
Thu Sep 5 13:51:57 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 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 in `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 pull request has now been integrated.
Changeset: b389bb45
Author: Stefan Karlsson <stefank at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/b389bb456726184e4691777b1bb02d4b8a8a3f97
Stats: 25 lines in 2 files changed: 12 ins; 12 del; 1 mod
8339540: Unify include requirements for PlatformMonitor/Mutex constructors/destructors
Reviewed-by: coleenp, sjohanss
-------------
PR: https://git.openjdk.org/jdk/pull/20851
More information about the hotspot-runtime-dev
mailing list