Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
}
time2 = get_cycles();
writer_time[(unsigned long)arg] += time2 - time1;
}
time2 = get_cycles();
writer_time[(unsigned long)arg] += time2 - time1;
}
printf("thread_end %s, thread id : %lx, tid %lu\n",
}
printf("thread_end %s, thread id : %lx, tid %lu\n",
sleep(2);
for (i = 0; i < OUTER_WRITE_LOOP; i++) {
sleep(2);
for (i = 0; i < OUTER_WRITE_LOOP; i++) {
for (j = 0; j < INNER_WRITE_LOOP; j++) {
for (j = 0; j < INNER_WRITE_LOOP; j++) {
new = malloc(sizeof(struct test_array));
rcu_copy_mutex_lock();
old = test_rcu_pointer;
new = malloc(sizeof(struct test_array));
rcu_copy_mutex_lock();
old = test_rcu_pointer;
+ time2 = get_cycles();
+ writer_time[(unsigned long)arg] += time2 - time1;
+ usleep(1);
- time2 = get_cycles();
- writer_time[(unsigned long)arg] += time2 - time1;
- usleep(1);
}
printf("thread_end %s, thread id : %lx, tid %lu\n",
}
printf("thread_end %s, thread id : %lx, tid %lu\n",