diff --git a/config/ompi_config_threads.m4 b/config/ompi_config_threads.m4 index 5031757b59..7c3b7f3865 100644 --- a/config/ompi_config_threads.m4 +++ b/config/ompi_config_threads.m4 @@ -171,8 +171,8 @@ EOF fi fi -AM_CONDITIONAL(OMPI_HAVE_POSIX_THREADS, test "$thread_type" = "posix") -AM_CONDITIONAL(OMPI_HAVE_SOLARIS_THREADS, test "$thread_type" = "solaris") +AM_CONDITIONAL(OMPI_HAVE_POSIX_THREADS, test "$THREAD_TYPE" = "posix") +AM_CONDITIONAL(OMPI_HAVE_SOLARIS_THREADS, test "$THREAD_TYPE" = "solaris") # # Now configure the whole MPI and progress thread gorp diff --git a/opal/mca/memory/ptmalloc2/Makefile.am b/opal/mca/memory/ptmalloc2/Makefile.am index ca1ba4da49..21ec06041e 100644 --- a/opal/mca/memory/ptmalloc2/Makefile.am +++ b/opal/mca/memory/ptmalloc2/Makefile.am @@ -21,7 +21,10 @@ AM_CPPFLAGS = -DMALLOC_DEBUG=0 if OMPI_HAVE_POSIX_THREADS -AM_CPPFLAGS += -DUSE_TSD_DATA_HACK \ +AM_CPPFLAGS += \ + -D_GNU_SOURCE=1 \ + -DUSE_TSD_DATA_HACK=1 \ + -DMALLOC_HOOKS=1 \ -I$(srcdir)/sysdeps/pthread endif if OMPI_HAVE_SOLARIS_THREADS diff --git a/opal/mca/memory/ptmalloc2/sysdeps/pthread/malloc-machine.h b/opal/mca/memory/ptmalloc2/sysdeps/pthread/malloc-machine.h index 3940a7d6f9..401202ad69 100644 --- a/opal/mca/memory/ptmalloc2/sysdeps/pthread/malloc-machine.h +++ b/opal/mca/memory/ptmalloc2/sysdeps/pthread/malloc-machine.h @@ -78,7 +78,7 @@ static inline int mutex_trylock(mutex_t *m) { } static inline int mutex_unlock(mutex_t *m) { m->lock = 0; - __asm __volatile ("" : "=m" (m->lock) : "0" (m->lock)); + __asm __volatile ("" : : : "memory"); return 0; }