Преглед на файлове

- pthread_setname_np does not have the same prototype on Darwin...

Olivier Aumage преди 8 години
родител
ревизия
94425283ed
променени са 2 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 2 0
      include/starpu_config.h.in
  2. 4 0
      include/starpu_thread.h

+ 2 - 0
include/starpu_config.h.in

@@ -143,4 +143,6 @@ typedef ssize_t starpu_ssize_t;
 /* Enable Fortran to C MPI interface */
 /* Enable Fortran to C MPI interface */
 #undef  HAVE_MPI_COMM_F2C
 #undef  HAVE_MPI_COMM_F2C
 
 
+#undef STARPU_HAVE_DARWIN
+
 #endif
 #endif

+ 4 - 0
include/starpu_thread.h

@@ -63,7 +63,11 @@ typedef pthread_attr_t starpu_pthread_attr_t;
 #define starpu_pthread_create pthread_create
 #define starpu_pthread_create pthread_create
 #define starpu_pthread_create_on(name, thread, attr, routine, arg, where) starpu_pthread_create(thread, attr, routine, arg)
 #define starpu_pthread_create_on(name, thread, attr, routine, arg, where) starpu_pthread_create(thread, attr, routine, arg)
 #ifdef STARPU_HAVE_PTHREAD_SETNAME_NP
 #ifdef STARPU_HAVE_PTHREAD_SETNAME_NP
+#ifdef STARPU_HAVE_DARWIN
+#define starpu_pthread_setname(thread, name) pthread_setname_np(name)
+#else
 #define starpu_pthread_setname(thread, name) pthread_setname_np(thread, name)
 #define starpu_pthread_setname(thread, name) pthread_setname_np(thread, name)
+#endif
 #else
 #else
 #define starpu_pthread_setname(thread, name)
 #define starpu_pthread_setname(thread, name)
 #endif
 #endif