diff options
author | Joe Orton <jorton@apache.org> | 2020-06-01 12:45:13 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2020-06-01 12:45:13 +0000 |
commit | 4b53081b2fc3f5ff719b9ae0c49cee1c12f0e9cb (patch) | |
tree | 601db649eaa8f19f142e78934566fdb27b4ef3d7 /configure.in | |
parent | 858b61fb837b90df106f2200df64cd434b15afdc (diff) | |
download | apr-4b53081b2fc3f5ff719b9ae0c49cee1c12f0e9cb.tar.gz |
* configure.in: Add --enable-thread-debug, which defines
APR_THREAD_DEBUG.
* locks/unix/thread_mutex.c (apr_thread_mutex_create): For
APR_THREAD_DEBUG, use the ERRORCHECK mutex type by default (if not
nested/recursive), which reliably fails for cases of otherwise
undefined behaviour:
a) relocking a mutex locked by the current thread
b) unlocking a thread locked by another thread
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1878362 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 47f0d0b26..937bc22ba 100644 --- a/configure.in +++ b/configure.in @@ -435,6 +435,13 @@ AC_ARG_ENABLE(pool-debug, fi ]) +AC_ARG_ENABLE(thread-debug, + [ --enable-thread-debug Turn on run-time thread debugging tests], + [ if test $enableval = yes; then + APR_ADDTO(CPPFLAGS, [-DAPR_THREAD_DEBUG=1]) + fi + ]) + if test "$host" = "i586-pc-beos"; then AC_ARG_ENABLE(malloc-debug,[ --enable-malloc-debug Switch on malloc_debug for BeOS], APR_REMOVEFROM(CFLAGS, -O2) |