Displaying 2 results from an estimated 2 matches for "pthread_mutex_errorcheck".
2014 Jun 07
4
[LLVMdev] Multi-threading and mutexes in LLVM
On Fri, Jun 6, 2014 at 10:57 PM, Kostya Serebryany <kcc at google.com> wrote:
> As for the deadlocks, indeed it is possible to add deadlock detection
> directly to std::mutex and std::spinlock code.
> It may even end up being more efficient than a standalone deadlock
> detector --
> but only if we can add an extra word to the mutex/spinlock object.
> The deadlock
2014 Jun 09
2
[LLVMdev] Multi-threading and mutexes in LLVM
>
>
> On FreeBSD and OS X, the underlying pthread_mutex can already do deadlock
> detection, so I don't see why you'd need to add another word. The
> PTHREAD_MUTEX_ERRORCHECK attribute has been part of POSIX since 1997, so
> I'd expect it to be supported everywhere.
>
PTHREAD_MUTEX_ERRORCHECK detects the deadlock that already happened.
tsan's deadlock detector (as well as helgrind and many other similar tools)
detects lock order inversion, i.e. a situatio...