Re: Better LWLocks with compare-and-swap (9.4)
От | Heikki Linnakangas |
---|---|
Тема | Re: Better LWLocks with compare-and-swap (9.4) |
Дата | |
Msg-id | 519A85A2.5040704@vmware.com обсуждение исходный текст |
Ответ на | Re: Better LWLocks with compare-and-swap (9.4) (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Список | pgsql-hackers |
On 20.05.2013 23:11, Alvaro Herrera wrote: >> diff --git a/configure.in b/configure.in >> index 4ea5699..ff8470e 100644 >> --- a/configure.in >> +++ b/configure.in >> @@ -1445,17 +1445,6 @@ fi >> AC_CHECK_FUNCS([strtoll strtoq], [break]) >> AC_CHECK_FUNCS([strtoull strtouq], [break]) >> >> -AC_CACHE_CHECK([for builtin locking functions], pgac_cv_gcc_int_atomics, >> -[AC_TRY_LINK([], >> - [int lock = 0; >> - __sync_lock_test_and_set(&lock, 1); >> - __sync_lock_release(&lock);], >> - [pgac_cv_gcc_int_atomics="yes"], >> - [pgac_cv_gcc_int_atomics="no"])]) >> -if test x"$pgac_cv_gcc_int_atomics" = x"yes"; then >> - AC_DEFINE(HAVE_GCC_INT_ATOMICS, 1, [Define to 1 if you have __sync_lock_test_and_set(int *) and friends.]) >> -fi >> - > > Careful here --- s_lock.h has some code conditional on > HAVE_GCC_INT_ATOMICS which your patch is not touching, yet it is > removing the definition, unless I'm misreading. Thanks, good catch. I renamed HAVE_GCC_INT_ATOMICS to HAVE_GCC_INT_TEST_AND_SET because "atomics" seems too generic when we also test for __sync_val_compare_and_swap(p, oldval, newval). - Heikki
В списке pgsql-hackers по дате отправления: