Skip site navigation (1) Skip section navigation (2)

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

From: Noah Misch <noah(at)leadboat(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>,PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: [PATCH] Use CC atomic builtins if available [was: Re: TASpatch for building on armel/armhf thumb]
Date: 2011-12-19 20:03:41
Message-ID: 20111219200341.GB9495@tornado.leadboat.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On Mon, Dec 19, 2011 at 05:09:11PM +0200, Heikki Linnakangas wrote:
> Actually, I believe our Itanium (and possibly ARM, too) implementation  
> of S_UNLOCK() is wrong as it is. There is no platform-specific  
> S_UNLOCK() defined for Itanium, so we're using the generic 
> implementation:
>
> #if !defined(S_UNLOCK)
> #define S_UNLOCK(lock)		(*((volatile slock_t *) (lock)) = 0)
> #endif	 /* S_UNLOCK */
>
> That is not sufficient on platforms with a weak memory model, like Itanium.

Other processors may observe the lock as held after its release, but there's no
correctness problem.

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2011-12-19 20:12:58
Subject: Re: Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]
Previous:From: Martin PittDate: 2011-12-19 17:11:45
Subject: [PATCH v2] Use CC atomic builtins as a fallback

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group