Cleanup: missing sign compare fixes
A message that is not in the archive (sent off-list or not yet received): [email protected]
Merged with modifications. test_perthreadlock compares the iterator against 0 with a decrementing iterator, so we need to work on long.
Thanks,
Mathieu
Quoted 68 lines · ----- On Dec 19, 2018, at 11:44 AM, Michael Jeanson [email protected] wrote:
Signed-off-by Michael Jeanson <[email protected]>---
tests/benchmark/test_perthreadlock.c | 2 +- tests/benchmark/test_urcu_gc.c | 4 ++-- tests/benchmark/test_urcu_qsbr_gc.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)tests/benchmark/test_perthreadlock.c +1
-1@@ -207,7 +207,7 @@ void *thr_reader(void *data)void *thr_writer (void *data) {unsigned long wtidx = (unsigned long )data; -long tidx; +unsigned long tidx;printf_verbose ("thread_begin %s, tid %lu\n" ,"writer" ,urcu_get_thread_id ());tests/benchmark/test_urcu_gc.c +2
-2@@ -55,7 +55,7 @@ static unsigned long wdelay;static struct test_array *test_rcu_pointer; -static unsigned int reclaim_batch =1 ; +static long reclaim_batch =1 ;struct reclaim_queue {void **queue;/* Beginning of queue */ @@ -449,7 +449,7 @@ int main(int argc, char **argv)printf ("SUMMARY %-25s testdur %4lu nr_readers %3u rdur %6lu wdur %6lu " "nr_writers %3u " "wdelay %6lu nr_reads %12llu nr_writes %12llu nr_ops %12llu " -"batch %u\n" , +"batch %ld\n" , argv[0 ], duration, nr_readers, rduration, wduration, nr_writers, wdelay, tot_reads, tot_writes, tot_reads + tot_writes, reclaim_batch);tests/benchmark/test_urcu_qsbr_gc.c +2
-3@@ -57,7 +57,7 @@ static unsigned long duration;/* read-side C.S. duration, in loops */ static unsigned long rduration; -static unsigned int reclaim_batch =1 ; +static long reclaim_batch =1 ;struct reclaim_queue {void **queue;/* Beginning of queue */ @@ -450,7 +450,7 @@ int main(int argc, char **argv)printf ("SUMMARY %-25s testdur %4lu nr_readers %3u rdur %6lu wdur %6lu " "nr_writers %3u " "wdelay %6lu nr_reads %12llu nr_writes %12llu nr_ops %12llu " -"batch %u\n" , +"batch %ld\n" , argv[0 ], duration, nr_readers, rduration, wduration, nr_writers, wdelay, tot_reads, tot_writes, tot_reads + tot_writes, reclaim_batch); --2.17.1
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com