This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for PR libgomp/37938, IA64 specific.
On Thu, Nov 6, 2008 at 3:57 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Nov 6, 2008 at 3:47 PM, Steve Ellcey <sje@cup.hp.com> wrote:
>> On Fri, 2008-11-07 at 00:24 +0100, Jakub Jelinek wrote:
>>
>> I really think that using __sync_synchronize in config/linux/mutex.h and
>>> have all targets but ia64 override this header is worse than having
>>> just special config/linux/ia64/mutex.h.
>>>
>>> Jakub
>>
>> Yes, but I felt I had to protest at least a little. I will test this
>> libgomp patch overnight to verify that it works OK and has no
>> regressions. The only change from this mutex.h and the standard one is
>> the call to __sync_synchronize in gomp_mutex_unlock (and the comments
>> for that routine).
>>
>
> FWIW, ia64 has __sync_lock_release.
>
Will this work
static inline void gomp_mutex_unlock (gomp_mutex_t *mutex)
{
int val = *mutex;
__sync_lock_release (mutx);
if (__builtin_expect (val > 1, 0))
gomp_mutex_unlock_slow (mutex);
}
--
H.J.