Modifier and Type | Field and Description |
---|---|
static int |
STATUS_CREATED
IsolateThread memory has been allocated for the thread, but the thread is not on
the VMThreads list yet. |
static int |
STATUS_ILLEGAL
An illegal thread state for places where we need to pass a value.
|
static int |
STATUS_IN_JAVA
The thread is running in Java code.
|
static int |
STATUS_IN_NATIVE
The thread is running in native code.
|
static int |
STATUS_IN_SAFEPOINT
The thread has been requested to stop at a safepoint.
|
static int |
STATUS_IN_VM
The thread is running in trusted native code that was linked into the image.
|
static FastThreadLocalInt |
statusTL
The status of a
IsolateThread . |
Constructor and Description |
---|
StatusSupport() |
Modifier and Type | Method and Description |
---|---|
static void |
assertStatusJava() |
static void |
assertStatusNativeOrSafepoint() |
static void |
assertStatusVM() |
static boolean |
compareAndSetNativeToNewStatus(int newStatus)
A guarded transition from native to another status.
|
static boolean |
compareAndSetNativeToSafepoint(org.graalvm.nativeimage.IsolateThread vmThread)
There is no unguarded change to safepoint.
|
static int |
getNewThreadStatus(org.graalvm.nativeimage.c.function.CFunction.Transition transition) |
static int |
getNewThreadStatus(CFunctionOptions.Transition transition) |
static String |
getStatusString(org.graalvm.nativeimage.IsolateThread vmThread)
For debugging.
|
static int |
getStatusVolatile() |
static int |
getStatusVolatile(org.graalvm.nativeimage.IsolateThread vmThread) |
static boolean |
isStatusCreated(org.graalvm.nativeimage.IsolateThread vmThread) |
static boolean |
isStatusIgnoreSafepoints(org.graalvm.nativeimage.IsolateThread vmThread) |
static boolean |
isStatusJava() |
static boolean |
isStatusNativeOrSafepoint() |
static boolean |
isStatusNativeOrSafepoint(org.graalvm.nativeimage.IsolateThread vmThread) |
static boolean |
isStatusVM() |
static boolean |
isValidStatus(int status) |
static void |
setStatusIgnoreSafepoints()
Make myself immune to safepoints.
|
static void |
setStatusJavaUnguarded()
An unguarded transition to Java.
|
static void |
setStatusNative() |
static void |
setStatusNative(org.graalvm.nativeimage.IsolateThread vmThread) |
static void |
setStatusVM() |
public static final FastThreadLocalInt statusTL
IsolateThread
.public static final int STATUS_ILLEGAL
public static final int STATUS_CREATED
IsolateThread
memory has been allocated for the thread, but the thread is not on
the VMThreads list yet.public static final int STATUS_IN_JAVA
public static final int STATUS_IN_SAFEPOINT
public static final int STATUS_IN_NATIVE
public static final int STATUS_IN_VM
public static String getStatusString(org.graalvm.nativeimage.IsolateThread vmThread)
public static int getStatusVolatile(org.graalvm.nativeimage.IsolateThread vmThread)
public static int getStatusVolatile()
public static void setStatusNative()
public static void setStatusNative(org.graalvm.nativeimage.IsolateThread vmThread)
public static boolean compareAndSetNativeToSafepoint(org.graalvm.nativeimage.IsolateThread vmThread)
public static void setStatusJavaUnguarded()
public static void setStatusVM()
public static boolean compareAndSetNativeToNewStatus(int newStatus)
public static boolean isStatusCreated(org.graalvm.nativeimage.IsolateThread vmThread)
public static boolean isStatusNativeOrSafepoint(org.graalvm.nativeimage.IsolateThread vmThread)
public static boolean isStatusNativeOrSafepoint()
public static boolean isStatusVM()
public static boolean isStatusJava()
public static boolean isStatusIgnoreSafepoints(org.graalvm.nativeimage.IsolateThread vmThread)
public static void assertStatusJava()
public static void assertStatusNativeOrSafepoint()
public static void assertStatusVM()
public static void setStatusIgnoreSafepoints()
VMThreads.THREAD_MUTEX
) or make
sure that this thread does not access any movable heap objects (even executing write
barriers can already cause issues).public static boolean isValidStatus(int status)
public static int getNewThreadStatus(org.graalvm.nativeimage.c.function.CFunction.Transition transition)
public static int getNewThreadStatus(CFunctionOptions.Transition transition)