瀏覽代碼

- pthread_setaffinity_np does not set errno

Olivier Aumage 8 年之前
父節點
當前提交
2b51f898a3
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/core/topology.c

+ 2 - 1
src/core/topology.c

@@ -1358,7 +1358,8 @@ _starpu_bind_thread_on_cpu (
 	ret = pthread_setaffinity_np(self, sizeof(aff_mask), &aff_mask);
 	if (ret)
 	{
-		perror("binding thread");
+		const char *msg = strerror(ret);
+		fprintf(stderr, "pthread_setaffinity_np: %s\n", msg);
 		STARPU_ABORT();
 	}