< prev index next >

src/java.base/share/classes/jdk/internal/vm/Continuation.java

Print this page
*** 54,13 ***
          PRESERVE_SCOPED_VALUE_CACHE = (value == null) || Boolean.parseBoolean(value);
      }
  
      /** Reason for pinning */
      public enum Pinned {
!         /** Native frame on stack */ NATIVE,
!         /** Monitor held */          MONITOR,
!         /** In critical section */   CRITICAL_SECTION }
  
      /** Preemption attempt result */
      public enum PreemptStatus {
          /** Success */                                                      SUCCESS(null),
          /** Permanent failure */                                            PERM_FAIL_UNSUPPORTED(null),
--- 54,22 ---
          PRESERVE_SCOPED_VALUE_CACHE = (value == null) || Boolean.parseBoolean(value);
      }
  
      /** Reason for pinning */
      public enum Pinned {
!         /** Native frame on stack */ NATIVE(2),
!         /** Monitor held */          MONITOR(3),
!         /** In critical section */   CRITICAL_SECTION(4);
+ 
+         private final int value;
+         Pinned(int value) {
+             this.value = value;
+         }
+         public int value() {
+             return value;
+         }
+     }
  
      /** Preemption attempt result */
      public enum PreemptStatus {
          /** Success */                                                      SUCCESS(null),
          /** Permanent failure */                                            PERM_FAIL_UNSUPPORTED(null),

*** 351,12 ***
          return cont.yield0(scope, null);
      }
  
      @Hidden
      private boolean yield0(ContinuationScope scope, Continuation child) {
-         preempted = false;
- 
          if (scope != this.scope)
              this.yieldInfo = scope;
          int res = doYield();
          U.storeFence(); // needed to prevent certain transformations by the compiler
  
--- 360,10 ---
< prev index next >