Browse Source

Add --enable-spinlock-check configure option to enable

Samuel Thibault 11 years ago
parent
commit
4c97a56f4f
2 changed files with 14 additions and 1 deletions
  1. 7 1
      configure.ac
  2. 7 0
      doc/doxygen/chapters/configure_options.doxy

+ 7 - 1
configure.ac

@@ -1291,14 +1291,20 @@ AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [enable debug mode])],
 			enable_debug=$enableval, enable_debug=no)
 AC_MSG_RESULT($enable_debug)
 
+AC_ARG_ENABLE(spinlock_check, [AS_HELP_STRING([--enable-spinlock-check], [enable spinlock check])], enable_spinlock_check=$enableval, enable_spinlock_check=no)
+
 if test x$enable_debug = xyes; then
 	CFLAGS="$CFLAGS -O0"
-	AC_DEFINE(STARPU_SPINLOCK_CHECK, [1], [check spinlock use])
+	enable_spinlock_check=yes
 else
 	CFLAGS="-O3 $CFLAGS"
 fi
 CFLAGS+=" -gdwarf-2 -g3 "
 
+if test x$enable_spinlock_check = xyes; then
+	AC_DEFINE(STARPU_SPINLOCK_CHECK, [1], [check spinlock use])
+fi
+
 AC_MSG_CHECKING(whether extra checks should be performed)
 AC_ARG_ENABLE(fast, [AS_HELP_STRING([--enable-fast],
 			[do not enforce assertions])],

+ 7 - 0
doc/doxygen/chapters/configure_options.doxy

@@ -22,6 +22,13 @@ the following configure options.
 Enable debugging messages.
 </dd>
 
+<dt>--enable-spinlock-check</dt>
+<dd>
+\anchor enable-spinlock-check
+\addindex __configure__--enable-spinlock-check
+Enable checking that spinlocks are taken and released properly.
+</dd>
+
 <dt>--enable-fast</dt>
 <dd>
 \anchor enable-fast