- pthread_mutex_lock(&per_thread_lock[tidx].lock);
- assert(test_array.a == 8);
- pthread_mutex_unlock(&per_thread_lock[tidx].lock);
+ ret = pthread_mutex_lock(&per_thread_lock[tidx].lock);
+ if (ret) {
+ perror("Error in pthread mutex lock");
+ exit(-1);
+ }
+ urcu_posix_assert(test_array.a == 8);
+ ret = pthread_mutex_unlock(&per_thread_lock[tidx].lock);
+ if (ret) {
+ perror("Error in pthread mutex unlock");
+ exit(-1);
+ }