Переглянути джерело

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