瀏覽代碼

hack on windows: do not introduce a pthread.h, directly hardcode the type being used

Samuel Thibault 15 年之前
父節點
當前提交
489d92923c
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 2 0
      Makefile.am
  2. 6 0
      include/starpu_perfmodel.h

+ 2 - 0
Makefile.am

@@ -36,5 +36,7 @@ include_HEADERS = 				\
 	include/starpu_util.h			\
 	include/starpu_opencl.h			\
 	include/starpu_expert.h			\
+
+noinst_HEADERS = \
 	include/pthread_win32/pthread.h		\
 	include/pthread_win32/semaphore.h

+ 6 - 0
include/starpu_perfmodel.h

@@ -18,7 +18,9 @@
 #define __STARPU_PERFMODEL_H__
 
 #include <stdio.h>
+#ifndef __MINGW32__
 #include <pthread.h>
+#endif
 #include <starpu.h>
 #include <starpu_config.h>
 #include <starpu_task.h>
@@ -100,7 +102,11 @@ struct starpu_perfmodel_t {
 	} is_loaded;
 	unsigned benchmarking;
 
+#ifndef __MINGW32__
 	pthread_rwlock_t model_rwlock;
+#else
+	HANDLE model_rwlock;
+#endif
 };
 
 /* This function is intended to be used by external tools that should read the