Skip to content

Commit 322a178

Browse files
committed
Merge pull request #345 from ogrisel/fix-non-smp-server-pthread_atfork-reference
Do not reference pthread_atfork in non-SMP_SERVER mode
2 parents 57526ca + 2c556f0 commit 322a178

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

driver/others/memory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ void openblas_fork_handler()
264264
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60035
265265
// In the mean time build with USE_OPENMP=0 or link against another
266266
// implementation of OpenMP.
267-
#ifndef OS_WINDOWS
267+
#if !defined(OS_WINDOWS) && defined(SMP_SERVER)
268268
int err;
269-
err = pthread_atfork (BLASFUNC(blas_thread_shutdown), NULL, NULL);
269+
err = pthread_atfork ((void (*)(void)) BLASFUNC(blas_thread_shutdown), NULL, NULL);
270270
if(err != 0)
271271
openblas_warning(0, "OpenBLAS Warning ... cannot install fork handler. You may meet hang after fork.\n");
272272
#endif

0 commit comments

Comments
 (0)