Explorar o código

bug fix (if the rw-lock are used): release the rw-lock after sync'ing RAM

Cédric Augonnet %!s(int64=16) %!d(string=hai) anos
pai
achega
4a96fba2c2
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/datawizard/coherency.c

+ 4 - 0
src/datawizard/coherency.c

@@ -371,8 +371,12 @@ void starpu_sync_data_with_mem(data_state *state)
 		pthread_mutex_unlock(&statenode.lock);
 	}
 #else
+	/* NB: fetch_data automatically grabs the RW-lock so it needs to be
+ 	 * released explicitely afterward */
 	ret = fetch_data(state, R);
 	STARPU_ASSERT(!ret);
+
+	release_rw_lock(&state->data_lock);
 #endif
 }