From: Bert Wesarg Date: Fri, 6 Feb 2009 11:45:42 +0000 (-0500) Subject: URCU : use pthread_equal() X-Git-Tag: v0.1~321 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e6d6e2dc86bd63c7e702f68ffdb1e5a6ef723abc;p=urcu.git URCU : use pthread_equal() But you should use pthread_equal() for you equality test of pthread_t. Signed-off-by: Bert Wesarg Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu.c b/urcu.c index d0d6138..e401d8d 100644 --- a/urcu.c +++ b/urcu.c @@ -185,7 +185,7 @@ void urcu_remove_reader(pthread_t id) assert(reader_data != NULL); for (index = reader_data; index < reader_data + num_readers; index++) { - if (index->tid == id) { + if (pthread_equal(index->tid, id)) { memcpy(index, &reader_data[num_readers - 1], sizeof(struct reader_data)); reader_data[num_readers - 1].tid = 0;