add support for pthread_rwlock