ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ForkJoinPool.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ForkJoinPool.java (file contents):
Revision 1.311 by dl, Fri Apr 8 00:04:42 2016 UTC vs.
Revision 1.312 by jsr166, Tue Apr 19 22:55:30 2016 UTC

# Line 260 | Line 260 | public class ForkJoinPool extends Abstra
260       * different position to use or create other queues -- they block
261       * only when creating and registering new queues. Because it is
262       * used only as a spinlock, unlocking requires only a "releasing"
263 <     * store (using putOrderedInt).
263 >     * store (using putIntRelease).
264       *
265       * Management
266       * ==========
# Line 755 | Line 755 | public class ForkJoinPool extends Abstra
755                  long offset = ((long)index << ASHIFT) + ABASE;
756                  ForkJoinPool p = pool;
757                  top = s + 1;
758 <                U.putOrderedObject(a, offset, task);
758 >                U.putObjectRelease(a, offset, task);
759                  if ((d = base - s) == 0 && p != null) {
760                      U.fullFence();
761                      p.signalWork();
# Line 973 | Line 973 | public class ForkJoinPool extends Abstra
973  
974                                  int jindex = j & m;
975                                  long jOffset = (jindex << ASHIFT) + ABASE;
976 <                                U.putOrderedObject(wa, jOffset, f);
976 >                                U.putObjectRelease(wa, jOffset, f);
977                              }
978                              U.storeFence();
979                              t.doExec();
# Line 1057 | Line 1057 | public class ForkJoinPool extends Abstra
1057                          popped = true;
1058                          top = s;
1059                      }
1060 <                    U.putOrderedInt(this, PHASE, 0);
1060 >                    U.putIntRelease(this, PHASE, 0);
1061                  }
1062              }
1063              return popped;
# Line 1093 | Line 1093 | public class ForkJoinPool extends Abstra
1093                                              help = true;
1094                                              top = s - 1;
1095                                          }
1096 <                                        U.putOrderedInt(this, PHASE, 0);
1096 >                                        U.putIntRelease(this, PHASE, 0);
1097                                          if (help)
1098                                              t.doExec();
1099                                      }
# Line 1122 | Line 1122 | public class ForkJoinPool extends Abstra
1122          }
1123  
1124          // Unsafe mechanics. Note that some are (and must be) the same as in FJP
1125 <        private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
1125 >        private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe();
1126          private static final long PHASE;
1127          private static final int ABASE;
1128          private static final int ASHIFT;
# Line 3193 | Line 3193 | public class ForkJoinPool extends Abstra
3193      }
3194  
3195      // Unsafe mechanics
3196 <    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();
3196 >    private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe();
3197      private static final long CTL;
3198      private static final long MODE;
3199      private static final int ABASE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines