On Thu, 13 Jul 2023 05:06:44 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Suggestion from David. Widen synchronized block so it is not necessarry >> for notInterrupted to be atomic. > > test/hotspot/jtreg/vmTestbase/nsk/jdb/interrupt/interrupt001/interrupt001a.java > line 86: > >> 84: private Log log; >> 85: >> 86: public static volatile int notInterrupted = numThreads; > > Nit: If always accessed under lock this does not need to be volatile. It's also read outside the lock by the debugger side of the test using JDI -> JDWP -> JVMTI. My guess is there is so much other synchronization going on that it probably doesn't need volatile, but technically I think it should have it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14817#discussion_r1261995182