Explorar o código

more portable way to write a bogus pthread_t

Samuel Thibault %!s(int64=8) %!d(string=hai) anos
pai
achega
4b6405da7d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/sched_ctx.h

+ 1 - 1
src/core/sched_ctx.h

@@ -257,7 +257,7 @@ static inline void _starpu_sched_ctx_unlock_write(unsigned sched_ctx_id)
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	STARPU_ASSERT(starpu_pthread_equal(sched_ctx->lock_write_owner, starpu_pthread_self()));
-	sched_ctx->lock_write_owner = 0;
+	memset(&sched_ctx->lock_write_owner, 0, sizeof(sched_ctx->lock_write_owner));
 	STARPU_PTHREAD_RWLOCK_UNLOCK(&sched_ctx->rwlock);
 }