projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename all arch primitives with prefix caa_
[urcu.git]
/
tests
/
rcutorture.h
diff --git
a/tests/rcutorture.h
b/tests/rcutorture.h
index 712d59df669c54d564b21d2a18b5f75c71a17372..4dac2f224faa9605f309195bea5e62e818080da0 100644
(file)
--- a/
tests/rcutorture.h
+++ b/
tests/rcutorture.h
@@
-77,7
+77,7
@@
char argsbuf[64];
#define GOFLAG_RUN 1
#define GOFLAG_STOP 2
#define GOFLAG_RUN 1
#define GOFLAG_STOP 2
-int goflag __attribute__((__aligned__(CACHE_LINE_SIZE))) = GOFLAG_INIT;
+int goflag __attribute__((__aligned__(CA
A_CA
CHE_LINE_SIZE))) = GOFLAG_INIT;
#define RCU_READ_RUN 1000
#define RCU_READ_RUN 1000
@@
-92,6
+92,12
@@
int goflag __attribute__((__aligned__(CACHE_LINE_SIZE))) = GOFLAG_INIT;
#define rcu_read_unlock_nest()
#endif /* #else #ifdef RCU_READ_NESTABLE */
#define rcu_read_unlock_nest()
#endif /* #else #ifdef RCU_READ_NESTABLE */
+#ifdef TORTURE_QSBR
+#define mark_rcu_quiescent_state rcu_quiescent_state
+#define put_thread_offline rcu_thread_offline
+#define put_thread_online rcu_thread_online
+#endif
+
#ifndef mark_rcu_quiescent_state
#define mark_rcu_quiescent_state() do ; while (0)
#endif /* #ifdef mark_rcu_quiescent_state */
#ifndef mark_rcu_quiescent_state
#define mark_rcu_quiescent_state() do ; while (0)
#endif /* #ifdef mark_rcu_quiescent_state */
@@
-164,15
+170,15
@@
void perftestrun(int nthreads, int nreaders, int nupdaters)
int t;
int duration = 1;
int t;
int duration = 1;
- smp_mb();
+
cmm_
smp_mb();
while (uatomic_read(&nthreadsrunning) < nthreads)
poll(NULL, 0, 1);
goflag = GOFLAG_RUN;
while (uatomic_read(&nthreadsrunning) < nthreads)
poll(NULL, 0, 1);
goflag = GOFLAG_RUN;
- smp_mb();
+
cmm_
smp_mb();
sleep(duration);
sleep(duration);
- smp_mb();
+
cmm_
smp_mb();
goflag = GOFLAG_STOP;
goflag = GOFLAG_STOP;
- smp_mb();
+
cmm_
smp_mb();
wait_all_threads();
for_each_thread(t) {
n_reads += per_thread(n_reads_pt, t);
wait_all_threads();
for_each_thread(t) {
n_reads += per_thread(n_reads_pt, t);
@@
-303,7
+309,7
@@
void *rcu_update_stress_test(void *arg)
i = 0;
p = &rcu_stress_array[i];
p->mbtest = 0;
i = 0;
p = &rcu_stress_array[i];
p->mbtest = 0;
- smp_mb();
+
cmm_
smp_mb();
p->pipe_count = 0;
p->mbtest = 1;
rcu_assign_pointer(rcu_stress_current, p);
p->pipe_count = 0;
p->mbtest = 1;
rcu_assign_pointer(rcu_stress_current, p);
@@
-349,13
+355,13
@@
void stresstest(int nreaders)
create_thread(rcu_update_stress_test, NULL);
for (i = 0; i < 5; i++)
create_thread(rcu_fake_update_stress_test, NULL);
create_thread(rcu_update_stress_test, NULL);
for (i = 0; i < 5; i++)
create_thread(rcu_fake_update_stress_test, NULL);
- smp_mb();
+
cmm_
smp_mb();
goflag = GOFLAG_RUN;
goflag = GOFLAG_RUN;
- smp_mb();
+
cmm_
smp_mb();
sleep(10);
sleep(10);
- smp_mb();
+
cmm_
smp_mb();
goflag = GOFLAG_STOP;
goflag = GOFLAG_STOP;
- smp_mb();
+
cmm_
smp_mb();
wait_all_threads();
for_each_thread(t)
n_reads += per_thread(n_reads_pt, t);
wait_all_threads();
for_each_thread(t)
n_reads += per_thread(n_reads_pt, t);
This page took
0.023895 seconds
and
4
git commands to generate.