Okay apparently it's failing with error 22 -- EINVAL. From the man page: EINVAL The mutex was created with the protocol attribute having the value PTHREAD_PRIO_PROTECT and the calling thread's priority is higher than the mutex's current priority ceiling.