zend_oo
zend_oo copied to clipboard
DEBUG_LOCKCONTENTION macro is never activated
There are some code sections enabled/disabled by the macro DEBUG_LOCKCONTENTION
but this macro is never activated during the compilation of Zendoo. We should restore it in debug mode, since it might be very useful when looking for deadlocks.
Possible solution
In the file configure.ac
change the section
if test "x$enable_debug" = xyes; then
CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER"
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -g3 -O0"
fi
if test "x$GXX" = xyes; then
CXXFLAGS="$CXXFLAGS -g3 -O0"
fi
fi
to
if test "x$enable_debug" = xyes; then
CPPFLAGS="$CPPFLAGS -DDEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION"
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -g3 -O0"
fi
if test "x$GXX" = xyes; then
CXXFLAGS="$CXXFLAGS -g3 -O0"
fi
fi