This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Document a behavior of an elided pthread_rwlock_unlock
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Cc:
- Date: Fri, 28 Oct 2016 18:28:29 -0200
- Subject: Re: [PATCH] Document a behavior of an elided pthread_rwlock_unlock
- Authentication-results: sourceware.org; auth=none
- References: <1477083990-9983-1-git-send-email-tuliom@linux.vnet.ibm.com> <1477328930.7146.81.camel@localhost.localdomain>
Torvald Riegel <triegel@redhat.com> writes:
> On Fri, 2016-10-21 at 19:06 -0200, Tulio Magno Quites Machado Filho
> wrote:
>> diff --git a/sysdeps/powerpc/nptl/elide.h b/sysdeps/powerpc/nptl/elide.h
>> index 77bd82e..c573981 100644
>> --- a/sysdeps/powerpc/nptl/elide.h
>> +++ b/sysdeps/powerpc/nptl/elide.h
>> @@ -102,6 +102,8 @@ __elide_unlock (int is_lock_free)
>> {
>> if (is_lock_free)
>> {
>> + /* Intentionally crashes when trying to unlock a lock not held by this
>> + thread. */
>
> I'd rather say that this can happen, and is okay (refering to the
> comment in pthread_rwlock_unlock.c). Otherwise, LGTM.
Good point. I'll make this change before pushing it.
Thanks!
--
Tulio Magno