X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=test_urcu.c;h=37bd43695a8264c0dfc9cce877e942c9995535bf;hp=8212dfc241748684e4bba7d287ffcb72afe6c406;hb=b1b5ce8f610ee61647b10d93d7a61b5fbf1f2ccd;hpb=41718ff94c4a07cb5f56d68084267798e471d1b1 diff --git a/test_urcu.c b/test_urcu.c index 8212dfc..37bd436 100644 --- a/test_urcu.c +++ b/test_urcu.c @@ -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;