Skip to content

Commit ce5ae51

Browse files
committedJun 3, 2022
8287637: Loom: Mismatched VirtualThread::state accessor
Reviewed-by: alanb
1 parent 59e9700 commit ce5ae51

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎src/hotspot/share/classfile/javaClasses.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2233,8 +2233,8 @@ oop java_lang_VirtualThread::continuation(oop vthread) {
22332233
return cont;
22342234
}
22352235

2236-
u2 java_lang_VirtualThread::state(oop vthread) {
2237-
return vthread->short_field_acquire(_state_offset);
2236+
int java_lang_VirtualThread::state(oop vthread) {
2237+
return vthread->int_field_acquire(_state_offset);
22382238
}
22392239

22402240
JavaThreadStatus java_lang_VirtualThread::map_state_to_thread_status(int state) {

‎src/hotspot/share/classfile/javaClasses.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ class java_lang_VirtualThread : AllStatic {
628628
static oop vthread_scope();
629629
static oop carrier_thread(oop vthread);
630630
static oop continuation(oop vthread);
631-
static u2 state(oop vthread);
631+
static int state(oop vthread);
632632
static JavaThreadStatus map_state_to_thread_status(int state);
633633
static bool notify_jvmti_events();
634634
static void set_notify_jvmti_events(bool enable);

0 commit comments

Comments
 (0)