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: [RFC] Lock elision implementation guidelines


> PTHREAD_MUTEX_RECURSIVE: No. While correctly-used recursive lock/unlock
> do work, this mutex type is specified to return an error if a thread
> unlocks a mutex that is not acquired or not acquired by this thread.

This may merit a POSIX interpretation request.  The DESCRIPTION section for
pthread_mutex_*lock does say, in the paragraph about
PTHREAD_MUTEX_RECURSIVE, "If a thread attempts to unlock a mutex that it
has not locked or a mutex which is unlocked, an error shall be returned."
But the ERRORS section does not list any error code for this case.  If it
were to, and it were listed as a "may fail" rather than a "shall fail",
then there could be some flexibility here.


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