*
* Userspace RCU library - test program (with baatch reclamation)
*
- * Copyright February 2009 - Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
+ * Copyright February 2009 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
- cpu_relax();
+ caa_cpu_relax();
}
static int verbose_mode;
static unsigned long long __thread nr_reads;
static
-unsigned long long __attribute__((aligned(CACHE_LINE_SIZE))) *tot_nr_writes;
+unsigned long long __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *tot_nr_writes;
static unsigned int nr_readers;
static unsigned int nr_writers;
while (!test_go)
{
}
- smp_mb();
+ cmm_smp_mb();
for (;;) {
rcu_read_lock();
while (!test_go)
{
}
- smp_mb();
+ cmm_smp_mb();
for (;;) {
#ifndef TEST_LOCAL_GC
tot_nr_writes = malloc(sizeof(*tot_nr_writes) * nr_writers);
pending_reclaims = malloc(sizeof(*pending_reclaims) * nr_writers);
if (reclaim_batch * sizeof(*pending_reclaims[i].queue)
- < CACHE_LINE_SIZE)
+ < CAA_CACHE_LINE_SIZE)
for (i = 0; i < nr_writers; i++)
- pending_reclaims[i].queue = calloc(1, CACHE_LINE_SIZE);
+ pending_reclaims[i].queue = calloc(1, CAA_CACHE_LINE_SIZE);
else
for (i = 0; i < nr_writers; i++)
pending_reclaims[i].queue = calloc(reclaim_batch,
exit(1);
}
- smp_mb();
+ cmm_smp_mb();
test_go = 1;
printf_verbose("total number of reads : %llu, writes %llu\n", tot_reads,
tot_writes);
- printf("SUMMARY %-25s testdur %4lu nr_readers %3u rdur %6lu "
+ 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",
- argv[0], duration, nr_readers, rduration,
+ argv[0], duration, nr_readers, rduration, wduration,
nr_writers, wdelay, tot_reads, tot_writes,
tot_reads + tot_writes, reclaim_batch);
free(tid_reader);