172 return _rehashed_table != NULL; |
173 return _rehashed_table != NULL; |
173 } |
174 } |
174 |
175 |
175 // Atomically claims the next available queue for exclusive access by |
176 // Atomically claims the next available queue for exclusive access by |
176 // the current thread. Returns the queue number of the claimed queue. |
177 // the current thread. Returns the queue number of the claimed queue. |
177 size_t claim_queue() { |
178 size_t claim_queue(); |
178 return (size_t)Atomic::add_ptr(1, &_next_queue) - 1; |
|
179 } |
|
180 |
179 |
181 // Atomically claims the next available table partition for exclusive |
180 // Atomically claims the next available table partition for exclusive |
182 // access by the current thread. Returns the table bucket number where |
181 // access by the current thread. Returns the table bucket number where |
183 // the claimed partition starts. |
182 // the claimed partition starts. |
184 size_t claim_table_partition(size_t partition_size) { |
183 size_t claim_table_partition(size_t partition_size); |
185 return (size_t)Atomic::add_ptr(partition_size, &_next_bucket) - partition_size; |
|
186 } |
|
187 |
184 |
188 // Applies and returns the result from the is_alive closure, or |
185 // Applies and returns the result from the is_alive closure, or |
189 // returns true if no such closure was provided. |
186 // returns true if no such closure was provided. |
190 bool is_alive(oop o) { |
187 bool is_alive(oop o) { |
191 if (_is_alive != NULL) { |
188 if (_is_alive != NULL) { |