rcuja test: cleanup
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 31 May 2013 17:48:04 +0000 (13:48 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 31 May 2013 17:48:04 +0000 (13:48 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/test_urcu_ja.c

index ecbaf031e502c7592f497d49f7e7474f9d85b669..8e14a9b2c05216d17509897a40e140bd9dc13732 100644 (file)
@@ -1077,69 +1077,4 @@ int main(int argc, char **argv)
                printf("Test ended with error: %d\n", ret);
        }
        return ret;
-
-#if 0
-       /*
-        * Hash Population needs to be seen as a RCU reader
-        * thread from the point of view of resize.
-        */
-       rcu_register_thread();
-       ret = (get_populate_hash_cb())();
-       assert(!ret);
-
-       rcu_thread_offline();
-
-       /* teardown counter thread */
-       act.sa_handler = SIG_IGN;
-       act.sa_flags = SA_RESTART;
-       ret = sigaction(SIGUSR2, &act, NULL);
-       if (ret == -1) {
-               perror("sigaction");
-               return -1;
-       }
-       {
-               char msg[1] = { 0x42 };
-               ssize_t ret;
-
-               do {
-                       ret = write(count_pipe[1], msg, 1);     /* wakeup thread */
-               } while (ret == -1L && errno == EINTR);
-       }
-
-       fflush(stdout);
-       rcu_thread_online();
-       rcu_read_lock();
-       printf("Counting nodes... ");
-       cds_lfht_count_nodes(test_ht, &approx_before, &count, &approx_after);
-       printf("done.\n");
-       test_delete_all_nodes(test_ht);
-       rcu_read_unlock();
-       rcu_thread_offline();
-       if (count) {
-               printf("Approximation before node accounting: %ld nodes.\n",
-                       approx_before);
-               printf("Nodes deleted from hash table before destroy: "
-                       "%lu nodes.\n",
-                       count);
-               printf("Approximation after node accounting: %ld nodes.\n",
-                       approx_after);
-       }
-       ret = cds_lfht_destroy(test_ht, NULL);
-       if (ret)
-               printf_verbose("final delete aborted\n");
-       else
-               printf_verbose("final delete success\n");
-       printf_verbose("total number of reads : %llu, writes %llu\n", tot_reads,
-              tot_writes);
-       printf("SUMMARY %-25s testdur %4lu nr_readers %3u rdur %6lu "
-               "nr_writers %3u "
-               "wdelay %6lu nr_reads %12llu nr_writes %12llu nr_ops %12llu "
-               "nr_add %12llu nr_add_fail %12llu nr_remove %12llu nr_leaked %12lld\n",
-               argv[0], duration, nr_readers, rduration,
-               nr_writers, wdelay, tot_reads, tot_writes,
-               tot_reads + tot_writes, tot_add, tot_add_exist, tot_remove,
-               (long long) tot_add + init_populate - tot_remove - count);
-       rcu_unregister_thread();
-#endif
-       return 0;
 }
This page took 0.026661 seconds and 4 git commands to generate.