src/share/vm/gc_implementation/g1/g1StringDedup.hpp
Print this page
rev 6676 : 8044775: Improve usage of umbrella header atomic.inline.hpp.
Reviewed-by: stefank, kvn
@@ -82,10 +82,11 @@
// http://openjdk.java.net/jeps/192
//
#include "memory/allocation.hpp"
#include "oops/oop.hpp"
+#include "runtime/atomic.hpp"
class OopClosure;
class BoolObjectClosure;
class ThreadClosure;
class outputStream;
@@ -172,20 +173,16 @@
return _rehashed_table != NULL;
}
// Atomically claims the next available queue for exclusive access by
// the current thread. Returns the queue number of the claimed queue.
- size_t claim_queue() {
- return (size_t)Atomic::add_ptr(1, &_next_queue) - 1;
- }
+ size_t claim_queue();
// 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 claim_table_partition(size_t partition_size) {
- return (size_t)Atomic::add_ptr(partition_size, &_next_bucket) - partition_size;
- }
+ size_t claim_table_partition(size_t partition_size);
// Applies and returns the result from the is_alive closure, or
// returns true if no such closure was provided.
bool is_alive(oop o) {
if (_is_alive != NULL) {