From 8c7d9df5bd82663bb0edf8952d1ac9d07a76c01e Mon Sep 17 00:00:00 2001 From: Christian Haeubl Date: Tue, 4 Feb 2025 10:06:59 +0100 Subject: [PATCH] Fix @Uninterruptible. --- .../src/com/oracle/svm/core/thread/VMThreads.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/thread/VMThreads.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/thread/VMThreads.java index 8e291e8b06b5..4b2a00e9a661 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/thread/VMThreads.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/thread/VMThreads.java @@ -26,7 +26,6 @@ import static com.oracle.svm.core.graal.nodes.WriteCurrentVMThreadNode.writeCurrentVMThread; -import jdk.graal.compiler.word.Word; import org.graalvm.nativeimage.CurrentIsolate; import org.graalvm.nativeimage.ImageSingletons; import org.graalvm.nativeimage.Isolate; @@ -69,6 +68,7 @@ import jdk.graal.compiler.core.common.SuppressFBWarnings; import jdk.graal.compiler.replacements.ReplacementsUtil; import jdk.graal.compiler.replacements.nodes.AssertionNode; +import jdk.graal.compiler.word.Word; /** * Utility methods for the manipulation and iteration of {@link IsolateThread}s. @@ -585,7 +585,7 @@ public boolean verifyIsCurrentThread(IsolateThread thread) { return OSThreadIdTL.get(thread).equal(osThreadId); } - @Uninterruptible(reason = "Called from uninterruptible code.", mayBeInlined = true) + @Uninterruptible(reason = "Locking without transition requires that the whole critical section is uninterruptible.") @SuppressFBWarnings(value = "UC", justification = "FB does not know that VMMutex objects are replaced, i.e., that the lock/unlock methods do not throw an error at run time.") public IsolateThread findIsolateThreadForCurrentOSThread(boolean inCrashHandler) { ThreadLookup threadLookup = ImageSingletons.lookup(ThreadLookup.class);