Explorar o código

Fix locking scheme for nworkers_able_to_execute_tasks. It should be a rdlock since the context isn't modified

Terry Cojean %!s(int64=9) %!d(string=hai) anos
pai
achega
818ff26066
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/sched_ctx.c

+ 1 - 1
src/core/sched_ctx.c

@@ -1405,7 +1405,7 @@ int _starpu_nworkers_able_to_execute_task(struct starpu_task *task, struct _star
 {
 	unsigned nworkers = 0;
 
-	STARPU_PTHREAD_RWLOCK_WRLOCK(&ctx_mutex[sched_ctx->id]);
+	STARPU_PTHREAD_RWLOCK_RDLOCK(&ctx_mutex[sched_ctx->id]);
 	struct starpu_worker_collection *workers = sched_ctx->workers;
 
 	struct starpu_sched_ctx_iterator it;