pthread: mutex - return the right values