Kaynağa Gözat

Add missing busy_count: putting on the list makes the handle busy

Samuel Thibault 8 yıl önce
ebeveyn
işleme
5864e3e5e5

+ 1 - 1
src/core/dependencies/data_arbiter_concurrency.c

@@ -566,10 +566,10 @@ void _starpu_notify_arbitered_dependencies(starpu_data_handle_t handle)
 			r_mode = _starpu_arbiter_filter_modes(r_mode);
 
 			_starpu_spin_lock(&handle->header_lock);
+			handle->busy_count++;
 			if (((handle->refcnt == 0) || (!(r_mode == STARPU_W) && (handle->current_mode == r_mode))))
 			{
 				handle->refcnt++;
-				handle->busy_count++;
 				handle->current_mode = r_mode;
 				put_in_list = 0;
 			}