mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
hurd: Rather use hurd_thread_self
This avoids a kernel RPC, and fixes port ref leak.
This commit is contained in:
parent
4bd1cc8fcd
commit
69baef165c
1 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@
|
||||||
#include <sys/thr.h>
|
#include <sys/thr.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(__GNU__)
|
#if defined(__GNU__)
|
||||||
#include <mach.h>
|
#include <hurd.h>
|
||||||
#endif
|
#endif
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -225,7 +225,7 @@ static pid_t _gettid(void)
|
||||||
thr_self(&pid);
|
thr_self(&pid);
|
||||||
return (pid_t)pid;
|
return (pid_t)pid;
|
||||||
#elif defined(__GNU__)
|
#elif defined(__GNU__)
|
||||||
mach_port_t thread = mach_thread_self();
|
mach_port_t thread = hurd_thread_self();
|
||||||
return (pid_t)thread;
|
return (pid_t)thread;
|
||||||
#else
|
#else
|
||||||
#error "No gettid impl"
|
#error "No gettid impl"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue