Well, I have wasted 4 days finding a bug that ended as another Linux mutex deadlock case. To explain, default Linux version of mutex (unlike Win32 critical section) does not allow single thread to lock the same mutex twice. This often leads to quite tiresome problems and hard to spot bugs.
Now I have found there exists "PTHREAD_MUTEX_RECURSIVE" (non-default) attribute that should avoid this trouble. Anyway, support on various platforms does not seem to be consistent, at least it was not in the past.
Therefore, before going there, any information about platform specific issues is highly appreciated.