Skip to content

Commit 806073c

Browse files
committed
utest: test fork safety on OpenMP >= 5
In addition to testing fork safety on non-OpenMP builds, test it when omp_pause_resource_all() is available to release the locks.
1 parent f677f4f commit 806073c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

utest/Makefile

+7-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,14 @@ endif
4444
#this does not work with OpenMP nor with native Windows or Android threads
4545
# FIXME TBD if this works on OSX, SunOS, POWER and zarch
4646
ifeq ($(OSNAME), $(filter $(OSNAME),Linux CYGWIN_NT))
47-
ifneq ($(USE_OPENMP), 1)
48-
OBJS += test_fork.o
47+
ifeq ($(USE_OPENMP), 1)
48+
ifeq ($(HAVE_OMP_PAUSE_RESOURCE_ALL), 1)
49+
OBJS += test_fork.o
4950
endif
50-
OBJS += test_post_fork.o
51+
else
52+
OBJS += test_fork.o
53+
endif
54+
OBJS += test_post_fork.o
5155
endif
5256

5357
ifeq ($(C_COMPILER), PGI)

0 commit comments

Comments
 (0)