RFR: JDK-8278585: Drop unused code from OSThread

Thomas Stuefe stuefe at openjdk.java.net
Mon Dec 13 06:14:29 UTC 2021


Gentle cleanup of OSThread, removes some unused functionality. No functional changes.

- both start proc and start param parameters are unused (when we create threads we always start with `thread_native_entry` as thread procedure). Removed members and constructor arguments (had always been called with NULL)
- `valid_reposition_failure()` is unused, returns always false on all platforms. Used to return true on Solaris, but I could not find a caller even going back to jdk-8.
- removed `thread_id_offset`, `thread_id_size`, both had been used at one time by C1 but not anymore.
- Finally, removed the platform-independent stub for the windows-only `set_interrupted()`; replaced it with WINDOWS_ONLY at the only two places where it is invoked. Matter of taste, but I find this actually clearer than having a single-platform function looking like a generic one.

Thanks, Thomas

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

Commit messages:
 - remove unused members from OSThread

Changes: https://git.openjdk.java.net/jdk/pull/6809/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6809&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8278585
  Stats: 57 lines in 12 files changed: 0 ins; 44 del; 13 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6809.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6809/head:pull/6809

PR: https://git.openjdk.java.net/jdk/pull/6809


More information about the hotspot-dev mailing list