Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: laijs@cn.fujitsu.com (Lai Jiangshan)
Subject: [lttng-dev] [PATCH 2/4] test: remove rcu_defer_register_thread() from test_urcu_lfs
Date: Sun, 14 Oct 2012 00:08:32 +0800	[thread overview]
Message-ID: <1350144514-4132-2-git-send-email-laijs@cn.fujitsu.com> (raw)
In-Reply-To: <1350144514-4132-1-git-send-email-laijs@cn.fujitsu.com>

test_urcu_lfs has already switch to call_rcu(), rcu_defer_register_thread()
is unneeded.

Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>
---
 tests/test_urcu_lfs.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/tests/test_urcu_lfs.c b/tests/test_urcu_lfs.c
index 681b654..f5d7d4b 100644
--- a/tests/test_urcu_lfs.c
+++ b/tests/test_urcu_lfs.c
@@ -67,7 +67,6 @@ static inline pid_t gettid(void)
 #endif
 #include <urcu.h>
 #include <urcu/cds.h>
-#include <urcu-defer.h>
 
 static volatile int test_go, test_stop;
 
@@ -221,18 +220,12 @@ void free_node_cb(struct rcu_head *head)
 void *thr_dequeuer(void *_count)
 {
 	unsigned long long *count = _count;
-	int ret;
 
 	printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n",
 			"dequeuer", pthread_self(), (unsigned long)gettid());
 
 	set_affinity();
 
-	ret = rcu_defer_register_thread();
-	if (ret) {
-		printf("Error in rcu_defer_register_thread\n");
-		exit(-1);
-	}
 	rcu_register_thread();
 
 	while (!test_go)
@@ -261,7 +254,6 @@ void *thr_dequeuer(void *_count)
 	}
 
 	rcu_unregister_thread();
-	rcu_defer_unregister_thread();
 
 	printf_verbose("dequeuer thread_end, thread id : %lx, tid %lu, "
 		       "dequeues %llu, successful_dequeues %llu\n",
-- 
1.7.7.6




  reply	other threads:[~2012-10-13 16:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-13 16:08 [lttng-dev] [PATCH 1/4] test: test for the proper pointer Lai Jiangshan
2012-10-13 16:08 ` Lai Jiangshan [this message]
2012-10-13 16:46   ` [lttng-dev] [PATCH 2/4] test: remove rcu_defer_register_thread() from test_urcu_lfs Mathieu Desnoyers
2012-10-13 16:08 ` [lttng-dev] [PATCH 3/4] test: test for the proper pointer Lai Jiangshan
2012-10-13 16:48   ` Mathieu Desnoyers
2012-10-13 16:08 ` [lttng-dev] [PATCH 4/4] test: remove rcu_defer_register_thread() from test_urcu_lfq Lai Jiangshan
2012-10-13 16:49   ` Mathieu Desnoyers
2012-10-13 16:44 ` [lttng-dev] [PATCH 1/4] test: test for the proper pointer Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1350144514-4132-2-git-send-email-laijs@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox