Check for the failure of pthread_mutex_lock() and pthread_mutex_unlock(). Since
it is a serious bug if these fail (indicates a logic error) call abort().
Authored by: sms00 2005-01-14
Parent: [r2627]
Child: [r2629]