projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unlikely for tests
[urcu.git]
/
test_perthreadlock.c
diff --git
a/test_perthreadlock.c
b/test_perthreadlock.c
index 7b6a65c8c6fb18a68531e13c19587e44aad6729c..3684975eebf7c85312cd3a6a2322f88af03c022c 100644
(file)
--- a/
test_perthreadlock.c
+++ b/
test_perthreadlock.c
@@
-134,7
+134,7
@@
void *thr_reader(void *data)
assert(test_array.a == 8);
pthread_mutex_unlock(&per_thread_lock[tidx].lock);
nr_reads++;
assert(test_array.a == 8);
pthread_mutex_unlock(&per_thread_lock[tidx].lock);
nr_reads++;
- if (
!test_duration_read(
))
+ if (
unlikely(!test_duration_read()
))
break;
}
break;
}
@@
-168,9
+168,9
@@
void *thr_writer(void *data)
pthread_mutex_unlock(&per_thread_lock[tidx].lock);
}
nr_writes++;
pthread_mutex_unlock(&per_thread_lock[tidx].lock);
}
nr_writes++;
- if (
!test_duration_write(
))
+ if (
unlikely(!test_duration_write()
))
break;
break;
- if (
wdelay
)
+ if (
unlikely(wdelay)
)
usleep(wdelay);
}
usleep(wdelay);
}
This page took
0.023216 seconds
and
4
git commands to generate.