Selaa lähdekoodia

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

Olivier Aumage 8 vuotta sitten
vanhempi
commit
94425283ed
2 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  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 */
 #undef  HAVE_MPI_COMM_F2C
 
+#undef STARPU_HAVE_DARWIN
+
 #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_on(name, thread, attr, routine, arg, where) starpu_pthread_create(thread, attr, routine, arg)
 #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)
+#endif
 #else
 #define starpu_pthread_setname(thread, name)
 #endif