runs
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 6 Feb 2009 01:04:29 +0000 (20:04 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 6 Feb 2009 01:04:29 +0000 (20:04 -0500)
test_urcu.c

index 8212dfc241748684e4bba7d287ffcb72afe6c406..37bd43695a8264c0dfc9cce877e942c9995535bf 100644 (file)
@@ -17,8 +17,8 @@ struct test_array {
 
 static struct test_array *test_rcu_pointer;
 
-#define NR_READ 1000
-#define NR_WRITE 50
+#define NR_READ 10
+#define NR_WRITE 5
 
 
 void *thr_reader(void *arg)
@@ -32,7 +32,7 @@ void *thr_reader(void *arg)
 
        urcu_register_thread();
 
-       for (i = 0; i < 1000; i++) {
+       for (i = 0; i < 1000000; i++) {
                qparity = rcu_read_lock();
                local_ptr = rcu_dereference(test_rcu_pointer);
                if (local_ptr) {
@@ -58,7 +58,7 @@ void *thr_writer(void *arg)
                        "writer", pthread_self(), getpid());
        sleep(2);
 
-       for (i = 0; i < 1000; i++) {
+       for (i = 0; i < 1000000; i++) {
                rcu_write_lock();
                new = malloc(sizeof(struct test_array));
                old = test_rcu_pointer;
This page took 0.02624 seconds and 4 git commands to generate.