Commit 860d2b39 authored by unknown's avatar unknown

sync0sync.ic InnoDB now uses XCHG to implement mutex if GCC and x86

configure.in	InnoDB now uses XCHG to implement mutex if GCC and x86


innobase/configure.in:
  InnoDB now uses XCHG to implement mutex if GCC and x86
innobase/include/sync0sync.ic:
  InnoDB now uses XCHG to implement mutex if GCC and x86
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
parent 714640bf
mwagner@evoq.mwagner.org
sasha@mysql.sashanet.com
heikki@donna.mysql.fi
......@@ -95,6 +95,11 @@ case "$target_os" in
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
esac
case "$target" in
i[[4567]]86-*-*)
CFLAGS="$CFLAGS -DUNIV_INTEL_X86";;
esac
AC_OUTPUT(Makefile os/Makefile ut/Makefile btr/Makefile
buf/Makefile com/Makefile data/Makefile
dict/Makefile dyn/Makefile
......
......@@ -86,6 +86,20 @@ mutex_test_and_set(
/* mutex_fence(); */
return(res);
#elif defined(__GNUC__) && defined(UNIV_INTEL_X86)
ulint* lw;
ulint res;
lw = &(mutex->lock_word);
/* In assembly we use the so-called AT & T syntax where
the order of operands is inverted compared to the ordinary Intel
syntax. The 'l' after the mnemonics denotes a 32-bit operation. */
asm volatile("movl $1, %%eax; xchgl (%%ecx), %%eax" :
"=eax" (res):
"ecx" (lw));
return(res);
#else
ibool ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment