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
This commit is contained in:
Steven Dake 2007-10-02 16:29:33 +00:00
parent c39ae9cc70
commit d0f5ef7ed1

View File

@ -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;