mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-05 19:36:15 +00:00
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:
parent
c39ae9cc70
commit
d0f5ef7ed1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user