src/hotspot/share/gc/g1/g1StringDedup.cpp
changeset 47634 6a0c42c40cd1
parent 47216 71c04702a3d5
child 47885 5caa1d5f74c1
--- a/src/hotspot/share/gc/g1/g1StringDedup.cpp	Mon Oct 16 20:22:41 2017 +0000
+++ b/src/hotspot/share/gc/g1/g1StringDedup.cpp	Mon Oct 16 22:36:06 2017 -0400
@@ -203,12 +203,12 @@
 // Atomically claims the next available queue for exclusive access by
 // the current thread. Returns the queue number of the claimed queue.
 size_t G1StringDedupUnlinkOrOopsDoClosure::claim_queue() {
-  return (size_t)Atomic::add_ptr(1, &_next_queue) - 1;
+  return Atomic::add((size_t)1, &_next_queue) - 1;
 }
 
 // Atomically claims the next available table partition for exclusive
 // access by the current thread. Returns the table bucket number where
 // the claimed partition starts.
 size_t G1StringDedupUnlinkOrOopsDoClosure::claim_table_partition(size_t partition_size) {
-  return (size_t)Atomic::add_ptr(partition_size, &_next_bucket) - partition_size;
+  return Atomic::add(partition_size, &_next_bucket) - partition_size;
 }