diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-11 11:40:59 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-11 11:40:59 -0400 |
commit | 117118e5f07da862a8a7901c60e880507c3be2d4 (patch) | |
tree | 93495d0fdddf04d14f190f2d81570d722fd92153 | |
parent | f47499f1579c47a15ebcdbcdc5f830748b05cc3c (diff) |
Use pthread_equals in libpbd for portability
-rw-r--r-- | libs/pbd/pthread_utils.cc | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |