[ltt-dev] [RFC PATCH 1/7] urcu:rename tid to pthread

Lai Jiangshan laijs at cn.fujitsu.com
Tue Aug 16 03:58:04 EDT 2011


Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>
---
 urcu.c             |    6 +++---
 urcu/static/urcu.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/urcu.c b/urcu.c
index 2339bc6..039df55 100644
--- a/urcu.c
+++ b/urcu.c
@@ -160,7 +160,7 @@ static void force_mb_all_readers(void)
 	 */
 	cds_list_for_each_entry(index, &registry, node) {
 		CMM_STORE_SHARED(index->need_mb, 1);
-		pthread_kill(index->tid, SIGRCU);
+		pthread_kill(index->pthread, SIGRCU);
 	}
 	/*
 	 * Wait for sighandler (and thus mb()) to execute on every thread.
@@ -177,7 +177,7 @@ static void force_mb_all_readers(void)
 	 */
 	cds_list_for_each_entry(index, &registry, node) {
 		while (CMM_LOAD_SHARED(index->need_mb)) {
-			pthread_kill(index->tid, SIGRCU);
+			pthread_kill(index->pthread, SIGRCU);
 			poll(NULL, 0, 1);
 		}
 	}
@@ -351,7 +351,7 @@ void rcu_read_unlock(void)
 
 void rcu_register_thread(void)
 {
-	rcu_reader.tid = pthread_self();
+	rcu_reader.pthread = pthread_self();
 	assert(rcu_reader.need_mb == 0);
 	assert(!(rcu_reader.ctr & RCU_GP_CTR_NEST_MASK));
 
diff --git a/urcu/static/urcu.h b/urcu/static/urcu.h
index 0295a3e..cfcb300 100644
--- a/urcu/static/urcu.h
+++ b/urcu/static/urcu.h
@@ -231,7 +231,7 @@ struct rcu_reader {
 	char need_mb;
 	/* Data used for registry */
 	struct cds_list_head node __attribute__((aligned(CAA_CACHE_LINE_SIZE)));
-	pthread_t tid;
+	pthread_t pthread;
 };
 
 extern struct rcu_reader __thread rcu_reader;
-- 
1.7.4.4





More information about the lttng-dev mailing list