Going to have to use pthread_rwlock for OS X support.