Integrated: 8289230: Move PlatformXXX class declarations out of os_xxx.hpp

Ioi Lam iklam at openjdk.org
Sat Jul 2 14:47:40 UTC 2022


On Tue, 28 Jun 2022 06:16:21 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> There are only two implementations of these classes (one for windows, and one for posix):
> 
> - PlatformEvent
> - PlatformParker
> - PlatformMutex
> - PlatformMonitor
> - ThreadCrashProtection
> 
> Before this PR, these classes are declared in os_xxx.hpp. This causes excessive inclusion of the large header file os.hpp by popular headers such as mutex.hpp, which needs only the declaration of PlatformMutex but not the other stuff in os.hpp
> 
> This PR moves the declarations to park_posix.hpp, mutex_posix.hpp, etc.
> 
> Note:  ideally, the definition of PlatformParker/PlatformEvent should be moved to park_posix.cpp, and PlatformMutex/PlatformMonitor should be moved to mutex_posix.cpp. However, the definition of these 4 classes are intertwined, so I'll leave them inside os_posix.cpp for now. (Same for the Windows version).

This pull request has now been integrated.

Changeset: cdf69792
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/cdf697925953f62e17a7916ba611d7e789f09edf
Stats:     1172 lines in 36 files changed: 703 ins; 390 del; 79 mod

8289230: Move PlatformXXX class declarations out of os_xxx.hpp

Reviewed-by: coleenp, ccheung

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

PR: https://git.openjdk.org/jdk/pull/9303


More information about the serviceability-dev mailing list