projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: missing sign compare fixes
[urcu.git]
/
tests
/
benchmark
/
test_rwlock.c
diff --git
a/tests/benchmark/test_rwlock.c
b/tests/benchmark/test_rwlock.c
index 827c117eb9a7c792e09274fd8169de25b2580050..4628080e3ba30846ad65a11fcbbec6c0329dfca4 100644
(file)
--- a/
tests/benchmark/test_rwlock.c
+++ b/
tests/benchmark/test_rwlock.c
@@
-277,6
+277,7
@@
int main(int argc, char **argv)
unsigned long long *count_reader, *count_writer;
unsigned long long tot_reads = 0, tot_writes = 0;
int i, a;
unsigned long long *count_reader, *count_writer;
unsigned long long tot_reads = 0, tot_writes = 0;
int i, a;
+ unsigned int i_thr;
if (argc < 4) {
show_usage(argc, argv);
if (argc < 4) {
show_usage(argc, argv);
@@
-364,15
+365,15
@@
int main(int argc, char **argv)
next_aff = 0;
next_aff = 0;
- for (i
= 0; i < nr_readers; i
++) {
- err = pthread_create(&tid_reader[i], NULL, thr_reader,
- &count_reader[i]);
+ for (i
_thr = 0; i_thr < nr_readers; i_thr
++) {
+ err = pthread_create(&tid_reader[i
_thr
], NULL, thr_reader,
+ &count_reader[i
_thr
]);
if (err != 0)
exit(1);
}
if (err != 0)
exit(1);
}
- for (i
= 0; i < nr_writers; i
++) {
- err = pthread_create(&tid_writer[i], NULL, thr_writer,
- &count_writer[i]);
+ for (i
_thr = 0; i_thr < nr_writers; i_thr
++) {
+ err = pthread_create(&tid_writer[i
_thr
], NULL, thr_writer,
+ &count_writer[i
_thr
]);
if (err != 0)
exit(1);
}
if (err != 0)
exit(1);
}
@@
-385,17
+386,17
@@
int main(int argc, char **argv)
test_stop = 1;
test_stop = 1;
- for (i
= 0; i < nr_readers; i
++) {
- err = pthread_join(tid_reader[i], &tret);
+ for (i
_thr = 0; i_thr < nr_readers; i_thr
++) {
+ err = pthread_join(tid_reader[i
_thr
], &tret);
if (err != 0)
exit(1);
if (err != 0)
exit(1);
- tot_reads += count_reader[i];
+ tot_reads += count_reader[i
_thr
];
}
}
- for (i
= 0; i < nr_writers; i
++) {
- err = pthread_join(tid_writer[i], &tret);
+ for (i
_thr = 0; i_thr < nr_writers; i_thr
++) {
+ err = pthread_join(tid_writer[i
_thr
], &tret);
if (err != 0)
exit(1);
if (err != 0)
exit(1);
- tot_writes += count_writer[i];
+ tot_writes += count_writer[i
_thr
];
}
printf_verbose("total number of reads : %llu, writes %llu\n", tot_reads,
}
printf_verbose("total number of reads : %llu, writes %llu\n", tot_reads,
This page took
0.026124 seconds
and
4
git commands to generate.