[PATCH] Document a behavior of an elided pthread_rwlock_unlock

Tulio Magno Quites Machado Filho tuliom@linux.vnet.ibm.com
Fri Oct 28 20:28:00 GMT 2016


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



More information about the Libc-alpha mailing list