Browse Source

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

Cédric Augonnet 16 years ago
parent
commit
4a96fba2c2
1 changed files with 4 additions and 0 deletions
  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
 }