Re: Better LWLocks with compare-and-swap (9.4)

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Better LWLocks with compare-and-swap (9.4)
Date: 2013-05-20 20:11:21
Message-ID: 20130520201121.GV15045@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-05-20 20:16:41 Re: Better LWLocks with compare-and-swap (9.4)
Previous Message Bruce Momjian 2013-05-20 20:01:39 Re: Better LWLocks with compare-and-swap (9.4)