Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8339540

Unify include requirements for PlatformMonitor/Mutex constructors/destructors

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 24
    • hotspot
    • b15

      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.

            stefank Stefan Karlsson
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: