- pthread_rwlock_rdlock(&lock);
- assert(test_array.a == 8);
- pthread_rwlock_unlock(&lock);
+ ret = pthread_rwlock_rdlock(&lock);
+ if (ret) {
+ fprintf(stderr, "reader pthread_rwlock_rdlock: %s\n", strerror(ret));
+ abort();
+ }
+
+ urcu_posix_assert(test_array.a == 8);
+
+ ret = pthread_rwlock_unlock(&lock);
+ if (ret) {
+ fprintf(stderr, "reader pthread_rwlock_unlock: %s\n", strerror(ret));
+ abort();
+ }