Special, for-tests-only, mode with atomics emulated by a mutex-locked variable - useful for finding atomics congestions
This commit is contained in:
21
configure.ac
21
configure.ac
@@ -132,6 +132,27 @@ AS_IF([test "$enable_fuzzing" = "afl"],
|
||||
[AC_MSG_ERROR([set CC=afl-<gcc|clang> when --enable-fuzzing=afl is used])])
|
||||
])
|
||||
|
||||
AC_ARG_ENABLE(mutex_atomics,
|
||||
AS_HELP_STRING([--enable-mutex-atomics],
|
||||
[emulate atomics by mutex-locked variables, useful for debugging
|
||||
[default=no]]),
|
||||
[],
|
||||
[enable_mutex_atomics=no])
|
||||
|
||||
AC_MSG_CHECKING([whether to emulate atomics with mutexes])
|
||||
case "$enable_mutex_atomics" in
|
||||
yes)
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(ISC_MUTEX_ATOMICS, 1, [Define to emulate atomic variables with mutexes.])
|
||||
;;
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR("--enable-mutex-atomics requires yes or no")
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Make very sure that these are the first files processed by
|
||||
# config.status, since we use the processed output as the input for
|
||||
|
||||
Reference in New Issue
Block a user