This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Document a behavior of an elided pthread_rwlock_unlock


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]