thread: use pthread_equal to compare thread ids

This commit is contained in:
Wim Taymans 2023-04-04 12:43:25 +02:00
parent edbfd180d0
commit f2be2923e6
2 changed files with 3 additions and 3 deletions

View file

@ -480,5 +480,5 @@ void pw_thread_loop_accept(struct pw_thread_loop *loop)
SPA_EXPORT
bool pw_thread_loop_in_thread(struct pw_thread_loop *loop)
{
return loop->running && pthread_self() == loop->thread;
return loop->running && pthread_equal(loop->thread, pthread_self());
}