From 117118e5f07da862a8a7901c60e880507c3be2d4 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 Jul 2013 11:40:59 -0400 Subject: Use pthread_equals in libpbd for portability --- libs/pbd/pthread_utils.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libs/pbd/pthread_utils.cc') diff --git a/libs/pbd/pthread_utils.cc b/libs/pbd/pthread_utils.cc index e8b5e2690d..6bc02e0883 100644 --- a/libs/pbd/pthread_utils.cc +++ b/libs/pbd/pthread_utils.cc @@ -127,7 +127,7 @@ pthread_kill_all (int signum) { pthread_mutex_lock (&thread_map_lock); for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) { - if ((*i) != pthread_self()) { + if (!pthread_equal ((*i), pthread_self())) { pthread_kill ((*i), signum); } } @@ -140,7 +140,7 @@ pthread_cancel_all () { pthread_mutex_lock (&thread_map_lock); for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) { - if ((*i) != pthread_self()) { + if (!pthread_equal ((*i), pthread_self())) { pthread_cancel ((*i)); } } @@ -153,7 +153,7 @@ pthread_cancel_one (pthread_t thread) { pthread_mutex_lock (&thread_map_lock); for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) { - if ((*i) == thread) { + if (pthread_equal ((*i), thread)) { all_threads.erase (i); break; } @@ -170,7 +170,7 @@ pthread_exit_pbd (void* status) pthread_mutex_lock (&thread_map_lock); for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) { - if ((*i) == thread) { + if (pthread_equal ((*i), thread)) { all_threads.erase (i); break; } -- cgit v1.2.3