On Windows, pthreads-win32 returns EINVAL if you specify an attribute when
calling pthread_rwlock_init. Work around this by only specifying the attribute
when FIO_HAVE_PSHARED_MUTEX is defined.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
log_err("pthread_rwlockattr_setpshared: %s\n", strerror(ret));
goto destroy_attr;
}
-#endif
ret = pthread_rwlock_init(&lock->lock, &attr);
+#else
+ ret = pthread_rwlock_init(&lock->lock, NULL);
+#endif
+
if (ret) {
log_err("pthread_rwlock_init: %s\n", strerror(ret));
goto destroy_attr;