浏览代码

more portable way to write a bogus pthread_t

Samuel Thibault 8 年之前
父节点
当前提交
d5af97f058
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/sched_ctx.c

+ 1 - 1
src/core/sched_ctx.c

@@ -533,7 +533,7 @@ struct _starpu_sched_ctx* _starpu_create_sched_ctx(struct starpu_sched_policy *p
 	sched_ctx->sms_end_idx = STARPU_NMAXSMS;
 	sched_ctx->nsms = nsms;
 	sched_ctx->stream_worker = -1;
-	sched_ctx->lock_write_owner = 0;
+	memset(&sched_ctx->lock_write_owner, 0, sizeof(sched_ctx->lock_write_owner));
 	STARPU_PTHREAD_RWLOCK_INIT(&sched_ctx->rwlock, NULL);
 	if(nsms > 0)
 	{