Merge pull request #345 from ogrisel/fix-non-smp-server-pthread_atfork-reference

Do not reference pthread_atfork in non-SMP_SERVER mode
This commit is contained in:
Zhang Xianyi 2014-02-26 00:54:01 +08:00
commit 322a178430
1 changed files with 2 additions and 2 deletions

View File

@ -264,9 +264,9 @@ void openblas_fork_handler()
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035
// In the mean time build with USE_OPENMP=0 or link against another
// implementation of OpenMP.
#ifndef OS_WINDOWS
#if !defined(OS_WINDOWS) && defined(SMP_SERVER)
int err;
err = pthread_atfork (BLASFUNC(blas_thread_shutdown), NULL, NULL);
err = pthread_atfork ((void (*)(void)) BLASFUNC(blas_thread_shutdown), NULL, NULL);
if(err != 0)
openblas_warning(0, "OpenBLAS Warning ... cannot install fork handler. You may meet hang after fork.\n");
#endif