Multithreaded Programming Guide

mutex_lock Return Values

mutex_lock() returns 0 if successful. When any of the following conditions is detected, mutex_lock() fails and returns the corresponding value.


EFAULT

Description:

mp points to an illegal address.


EDEADLK

Description:

The mutex is already locked and is owned by the calling thread.