projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
urcu-defer: remove call_rcu() API, replace by defer_rcu()
[urcu.git]
/
tests
/
rcutorture.h
diff --git
a/tests/rcutorture.h
b/tests/rcutorture.h
index 00b0b316b736c181aa3270d45a78b5403637db87..181547a0097dbaab406eceba1d19177da6fb8373 100644
(file)
--- a/
tests/rcutorture.h
+++ b/
tests/rcutorture.h
@@
-70,7
+70,7
@@
DEFINE_PER_THREAD(long long, n_updates_pt);
long long n_reads = 0LL;
long n_updates = 0L;
long long n_reads = 0LL;
long n_updates = 0L;
-
atomic_
t nthreadsrunning;
+
in
t nthreadsrunning;
char argsbuf[64];
#define GOFLAG_INIT 0
char argsbuf[64];
#define GOFLAG_INIT 0
@@
-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 */
@@
-116,7
+122,7
@@
void *rcu_read_perf_test(void *arg)
rcu_register_thread();
run_on(me);
rcu_register_thread();
run_on(me);
- atomic_inc(&nthreadsrunning);
+
u
atomic_inc(&nthreadsrunning);
while (goflag == GOFLAG_INIT)
poll(NULL, 0, 1);
mark_rcu_quiescent_state();
while (goflag == GOFLAG_INIT)
poll(NULL, 0, 1);
mark_rcu_quiescent_state();
@@
-141,7
+147,7
@@
void *rcu_update_perf_test(void *arg)
{
long long n_updates_local = 0;
{
long long n_updates_local = 0;
- atomic_inc(&nthreadsrunning);
+
u
atomic_inc(&nthreadsrunning);
while (goflag == GOFLAG_INIT)
poll(NULL, 0, 1);
while (goflag == GOFLAG_RUN) {
while (goflag == GOFLAG_INIT)
poll(NULL, 0, 1);
while (goflag == GOFLAG_RUN) {
@@
-156,7
+162,7
@@
void perftestinit(void)
{
init_per_thread(n_reads_pt, 0LL);
init_per_thread(n_updates_pt, 0LL);
{
init_per_thread(n_reads_pt, 0LL);
init_per_thread(n_updates_pt, 0LL);
- atomic_set(&nthreadsrunning, 0);
+
u
atomic_set(&nthreadsrunning, 0);
}
void perftestrun(int nthreads, int nreaders, int nupdaters)
}
void perftestrun(int nthreads, int nreaders, int nupdaters)
@@
-165,7
+171,7
@@
void perftestrun(int nthreads, int nreaders, int nupdaters)
int duration = 1;
smp_mb();
int duration = 1;
smp_mb();
- while (atomic_read(&nthreadsrunning) < nthreads)
+ while (
u
atomic_read(&nthreadsrunning) < nthreads)
poll(NULL, 0, 1);
goflag = GOFLAG_RUN;
smp_mb();
poll(NULL, 0, 1);
goflag = GOFLAG_RUN;
smp_mb();
This page took
0.023412 seconds
and
4
git commands to generate.