Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]
Дата
Msg-id 4EEF61A9.1060608@enterprisedb.com
обсуждение исходный текст
Ответ на Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]  (Martin Pitt <mpitt@debian.org>)
Список pgsql-bugs
On 19.12.2011 17:39, Martin Pitt wrote:
> Heikki Linnakangas [2011-12-19 17:09 +0200]:
>> One thing that caught my eye: if you use __sync_lock_and_test() to
>> implement S_LOCK(), you really should be using __sync_lock_release()
>> for S_UNLOCK().
>
> Right, the patch I send does that:
>
>   #define S_UNLOCK(lock) __sync_lock_release(lock)

Oh, I'm blind...

Can you comment on or test whether the existing TAS implementation is
broken on ARM, because the existing S_UNLOCK() on ARM doesn't act as a
memory barrier? If we're going to keep the existing snippet of inline
assembly for those variants of ARM where it works, we need to either fix
S_UNLOCK or convince ourselves that it's not broken.

I'll take a closer look at the same on Itanium.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Martin Pitt
Дата:
Сообщение: Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]