82 // respectively. |
82 // respectively. |
83 jint _processed_buffers_mut; |
83 jint _processed_buffers_mut; |
84 jint _processed_buffers_rs_thread; |
84 jint _processed_buffers_rs_thread; |
85 |
85 |
86 public: |
86 public: |
87 DirtyCardQueueSet(); |
87 DirtyCardQueueSet(bool notify_when_complete = true); |
88 |
88 |
89 void initialize(Monitor* cbl_mon, Mutex* fl_lock, |
89 void initialize(Monitor* cbl_mon, Mutex* fl_lock, |
90 int max_completed_queue = 0, |
90 int process_completed_threshold, |
91 Mutex* lock = NULL, PtrQueueSet* fl_owner = NULL); |
91 int max_completed_queue, |
|
92 Mutex* lock, PtrQueueSet* fl_owner = NULL); |
92 |
93 |
93 // The number of parallel ids that can be claimed to allow collector or |
94 // The number of parallel ids that can be claimed to allow collector or |
94 // mutator threads to do card-processing work. |
95 // mutator threads to do card-processing work. |
95 static size_t num_par_ids(); |
96 static size_t num_par_ids(); |
96 |
97 |
121 bool apply_closure_to_completed_buffer(int worker_i = 0, |
122 bool apply_closure_to_completed_buffer(int worker_i = 0, |
122 int stop_at = 0, |
123 int stop_at = 0, |
123 bool during_pause = false); |
124 bool during_pause = false); |
124 |
125 |
125 bool apply_closure_to_completed_buffer_helper(int worker_i, |
126 bool apply_closure_to_completed_buffer_helper(int worker_i, |
126 CompletedBufferNode* nd); |
127 BufferNode* nd); |
127 |
128 |
128 CompletedBufferNode* get_completed_buffer(int stop_at); |
129 BufferNode* get_completed_buffer(int stop_at); |
129 |
130 |
130 // Applies the current closure to all completed buffers, |
131 // Applies the current closure to all completed buffers, |
131 // non-consumptively. |
132 // non-consumptively. |
132 void apply_closure_to_all_completed_buffers(); |
133 void apply_closure_to_all_completed_buffers(); |
133 |
134 |