Selaa lähdekoodia

BUG FIX: when a data dependency is unlocked, we have to update the current mode
associated to the data (so that unlocking a task that accesses the data in
write mode will prevent concurrent writers/readers)

Cédric Augonnet 15 vuotta sitten
vanhempi
commit
eb5c03ad79
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      src/core/dependencies/data-concurrency.c

+ 3 - 0
src/core/dependencies/data-concurrency.c

@@ -204,6 +204,9 @@ void notify_data_dependencies(data_state *data)
 
 		data->refcnt++;
 	
+		/* the data is now attributed to that request */
+		data->current_mode = (r->mode==STARPU_R)?STARPU_R:STARPU_W;
+
 		starpu_spin_unlock(&data->header_lock);
 
 		if (r->is_requested_by_codelet)