equal
deleted
inserted
replaced
236 } |
236 } |
237 |
237 |
238 bool PtrQueueSet::process_or_enqueue_complete_buffer(BufferNode* node) { |
238 bool PtrQueueSet::process_or_enqueue_complete_buffer(BufferNode* node) { |
239 if (Thread::current()->is_Java_thread()) { |
239 if (Thread::current()->is_Java_thread()) { |
240 // We don't lock. It is fine to be epsilon-precise here. |
240 // We don't lock. It is fine to be epsilon-precise here. |
241 if (_max_completed_queue == 0 || _max_completed_queue > 0 && |
241 if (_max_completed_queue == 0 || |
242 _n_completed_buffers >= _max_completed_queue + _completed_queue_padding) { |
242 (_max_completed_queue > 0 && |
|
243 _n_completed_buffers >= _max_completed_queue + _completed_queue_padding)) { |
243 bool b = mut_process_buffer(node); |
244 bool b = mut_process_buffer(node); |
244 if (b) { |
245 if (b) { |
245 // True here means that the buffer hasn't been deallocated and the caller may reuse it. |
246 // True here means that the buffer hasn't been deallocated and the caller may reuse it. |
246 return true; |
247 return true; |
247 } |
248 } |