projects
/
urcu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
41718ff
)
runs
author
Mathieu Desnoyers
<mathieu.desnoyers@polymtl.ca>
Fri, 6 Feb 2009 01:04:29 +0000
(20:04 -0500)
committer
Mathieu Desnoyers
<mathieu.desnoyers@polymtl.ca>
Fri, 6 Feb 2009 01:04:29 +0000
(20:04 -0500)
test_urcu.c
patch
|
blob
|
blame
|
history
diff --git
a/test_urcu.c
b/test_urcu.c
index 8212dfc241748684e4bba7d287ffcb72afe6c406..37bd43695a8264c0dfc9cce877e942c9995535bf 100644
(file)
--- a/
test_urcu.c
+++ b/
test_urcu.c
@@
-17,8
+17,8
@@
struct test_array {
static struct test_array *test_rcu_pointer;
static struct test_array *test_rcu_pointer;
-#define NR_READ 10
00
-#define NR_WRITE 5
0
+#define NR_READ 10
+#define NR_WRITE 5
void *thr_reader(void *arg)
void *thr_reader(void *arg)
@@
-32,7
+32,7
@@
void *thr_reader(void *arg)
urcu_register_thread();
urcu_register_thread();
- for (i = 0; i < 1000; i++) {
+ for (i = 0; i < 1000
000
; i++) {
qparity = rcu_read_lock();
local_ptr = rcu_dereference(test_rcu_pointer);
if (local_ptr) {
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);
"writer", pthread_self(), getpid());
sleep(2);
- for (i = 0; i < 1000; i++) {
+ for (i = 0; i < 1000
000
; i++) {
rcu_write_lock();
new = malloc(sizeof(struct test_array));
old = test_rcu_pointer;
rcu_write_lock();
new = malloc(sizeof(struct test_array));
old = test_rcu_pointer;
This page took
0.025929 seconds
and
4
git commands to generate.