On Wed, 23 Oct 2024 05:23:39 GMT, Julian Waters <jwat...@openjdk.org> wrote:
>> src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c line 53: >> >>> 51: #ifndef _WIN32 >>> 52: static MUTEX_T my_mutex = MUTEX_INIT; >>> 53: #endif >> >> The reason for no reference on windows is because of the following on >> windows: >> >> >> #define MUTEX_LOCK(x) /* FIXUP? */ >> #define MUTEX_UNLOCK(x) /* FIXUP? */ >> >> >> So looks like this mutex support is something we never got around to. I >> think your current workaround is fine. > > I'm curious now, how to implement mutex support on Windows? I think I prefer > that to just making it completely unavailable on Windows We've gone 20 years without it on Windows, so I'm inclined not to worry about the lack of support on Windows. Logging is not used often in the debug agent. I've turned in on once in a while but usually find it too noisy and hard to read. What I usually opt for is changing some of the log_message() calls to instead just use tty_message(). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21616#discussion_r1813176284