projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Delay reader in loops, not us
[userspace-rcu.git]
/
test_qsbr.c
diff --git
a/test_qsbr.c
b/test_qsbr.c
index 7ff1aca9c7600994f5b2ad30d79d0ca7fd3a0e60..488c9041b1aae96d267aa6ea8e3ec4f027fc3032 100644
(file)
--- a/
test_qsbr.c
+++ b/
test_qsbr.c
@@
-65,9
+65,15
@@
static struct test_array *test_rcu_pointer;
static unsigned long duration;
static unsigned long duration;
-/* read-side C.S. duration, in
u
s */
+/* read-side C.S. duration, in
loop
s */
static unsigned long rduration;
static unsigned long rduration;
+static inline void loop_sleep(unsigned long l)
+{
+ while(l-- != 0)
+ cpu_relax();
+}
+
/*
* returns 0 if test should end.
*/
/*
* returns 0 if test should end.
*/
@@
-168,7
+174,7
@@
void *thr_reader(void *_count)
if (local_ptr)
assert(local_ptr->a == 8);
if (unlikely(rduration))
if (local_ptr)
assert(local_ptr->a == 8);
if (unlikely(rduration))
-
u
sleep(rduration);
+
loop_
sleep(rduration);
_rcu_read_unlock();
nr_reads++;
/* QS each 1024 reads */
_rcu_read_unlock();
nr_reads++;
/* QS each 1024 reads */
@@
-233,7
+239,7
@@
void show_usage(int argc, char **argv)
printf(" [-r] [-w] (yield reader and/or writer)");
#endif
printf(" [-d delay] (writer period (us))");
printf(" [-r] [-w] (yield reader and/or writer)");
#endif
printf(" [-d delay] (writer period (us))");
- printf(" [-c duration] (reader C.S. duration (
u
s))");
+ printf(" [-c duration] (reader C.S. duration (
in loop
s))");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
This page took
0.023107 seconds
and
4
git commands to generate.