On Wed, 17 Jan 2024 00:14:58 GMT, Jiangli Zhou <jian...@openjdk.org> wrote:

> Please review this PR with a simple solution for resolving duplicate `Thread` 
> symbol issue. In https://github.com/openjdk/jdk/pull/14808 comments, there 
> was an alternative suggestion to redefine the symbol at build time, such as  
> using`-DThread=HotSpotThread`. That would not address issues when symbol were 
> references as string literals. https://github.com/openjdk/jdk/pull/14808 also 
> discussed using namespace for hotspot code, which can have multiple 
> benefits/motivations. We could explore further using namespace with more 
> consensus on that approach.
> 
> Contributed by Chuck Rasbold and @jianglizhou.

I was reading through the other PR for StringTable and was wonder how difficult 
it would be to wrap all of hotspot in namespace hotspot {}; using namespace 
hotspot;  It would need a JEP as discussed in the other PR.

Alternatively if there's a #ifdef you can use for renaming the Thread to 
HotspotThread for static linking only, it might make this change less worrysome.

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

PR Comment: https://git.openjdk.org/jdk/pull/17456#issuecomment-1897336087

Reply via email to