This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] PowerPC: Fix a race condition when eliding a lock
- From: Torvald Riegel <triegel at redhat dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org, munroesj at linux dot vnet dot ibm dot com
- Date: Wed, 26 Aug 2015 10:45:38 +0200
- Subject: Re: [PATCH v2] PowerPC: Fix a race condition when eliding a lock
- Authentication-results: sourceware.org; auth=none
- References: <55BAEE77 dot 9000501 at redhat dot com> <1440084054-32243-1-git-send-email-tuliom at linux dot vnet dot ibm dot com> <55D628C2 dot 3080305 at redhat dot com> <55D62FD3 dot 8090109 at linaro dot org> <1440150735 dot 6240 dot 74 dot camel at localhost dot localdomain> <55DBE899 dot 2080908 at redhat dot com> <1440500727 dot 27492 dot 128 dot camel at localhost dot localdomain> <55DC786C dot 8080108 at redhat dot com> <1440520639 dot 27492 dot 190 dot camel at localhost dot localdomain> <55DC9C24 dot 5090401 at linaro dot org> <55DCA138 dot 5010101 at redhat dot com>
On Tue, 2015-08-25 at 13:09 -0400, Carlos O'Donell wrote:
> On 08/25/2015 12:47 PM, Adhemerval Zanella wrote:
> > I do not know which is better, since it will tie the ELIDE_LOCK implementation
> > with current internal pthread definitions.
>
> I prefer the idea of passing an inline function to ELIDE_LOCK
> and have the inline funciton do what it needs to compute is_lock_free
> and then return the result. This leaves ELIDE_LOCK simpler.
I agree.