Add pthread_mutex_init, pthread_rwlock_init, pthread_cond_init error handlings