[PATCH] Fix RWMutex to be thread-safe when pthread_rwlock is not available

Chandler Carruth chandlerc at gmail.com
Fri Feb 28 19:36:35 PST 2014


On Fri, Feb 28, 2014 at 7:28 PM, JF Bastien <jfb at google.com> wrote:

> I agree with Mark's assessment: his patch is better than the current state
> of things (silently saying a mutex was acquired when no such thing was
> done, causing non-deterministic crashes); implementing RWMutex for a few
> uses and only for a platform that doesn't have them is silly (when really
> NaCl should have them at some point, but that doesn't remove the need for
> this patch).
>
> His patch makes it so that the next platform without RWMutex doesn't have
> to debug this random crash. Overall lgtm.
>

:: eye roll ::

In the time we've spent defending this patch, we could have implemented a
real RWMutex. Fine, submit, I'll replace it later when I replace Mutex with
std::mutex.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140228/15a738b0/attachment.html>


More information about the llvm-commits mailing list