From d0f5ef7ed1489cb40066f897233f99d4414b65e4 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Tue, 2 Oct 2007 16:29:33 +0000 Subject: [PATCH] Fix problem where adding a timer in a timer callback would lock system and also timer additions were not protected by mutex because of backwards pthread_equal comparison. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1463 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exec/timer.c b/exec/timer.c index 2e026235..6df34f65 100644 --- a/exec/timer.c +++ b/exec/timer.c @@ -177,7 +177,7 @@ int openais_timer_add_absolute ( int res; int unlock; - if (pthread_equal (pthread_self(), expiry_thread) == 0) { + if (pthread_equal (pthread_self(), expiry_thread) != 0) { unlock = 0; } else { unlock = 1; @@ -209,7 +209,7 @@ int openais_timer_add_duration ( int res; int unlock; - if (pthread_equal (pthread_self(), expiry_thread) == 0) { + if (pthread_equal (pthread_self(), expiry_thread) != 0) { unlock = 0; } else { unlock = 1;