Add new --enable-fast-stack-trash option, defaults to on.

Original commit message from CVS:
Add new --enable-fast-stack-trash option, defaults to on.

We need this because valgrind doesn't implement an insn used
by it.
This commit is contained in:
Colin Walters 2003-05-31 09:51:28 +00:00
parent 28fbd2e87b
commit e5872bf925
2 changed files with 15 additions and 1 deletions

View file

@ -236,6 +236,16 @@ AC_HELP_STRING([--enable-atomic],[use atomic reference counting header]),
esac],
[USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
AC_ARG_ENABLE(fast-stack-trash,
AC_HELP_STRING([--enable-fast-stack-trash],[use fast memory allocator (i586 or above)]),
[case "${enableval}" in
yes) USE_FAST_STACK_TRASH=yes;;
noset) USE_FAST_STACK_TRASH=no;;
no) USE_FAST_STACK_TRASH=no;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
esac],
[USE_FAST_STACK_TRASH=yes]) dnl Default value
AC_ARG_ENABLE(plugin-builddir,
AC_HELP_STRING([--enable-plugin-builddir],[allow tests/demos to use non-installed plugins]),
[case "${enableval}" in
@ -358,6 +368,10 @@ if test "x$USE_ATOMIC_H" = xyes; then
AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available])
fi
if test "x$USE_FAST_STACK_TRASH" = xyes; then
AC_DEFINE(USE_FAST_STACK_TRASH, 1, [Define if we should use i586 optimized stack functions])
fi
dnl test if we have pthread_attr_setstack; if not use the older calls
AC_CHECK_LIB(pthread, pthread_attr_setstack,
AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACK, 1,

View file

@ -51,7 +51,7 @@ GST_INLINE_FUNC gpointer gst_trash_stack_pop (GstTrashStack *stack);
#if defined (GST_CAN_INLINE) || defined (__GST_TRASH_STACK_C__)
#if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2
#if defined (USE_FAST_STACK_TRASH) && defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2
#ifdef GST_CONFIG_NO_SMP
#define SMP_LOCK ""