How old is that code? You may find that fn is deprecated. From a quick Google, it looks like you should be using pthread_mutexattr_settype() instead.