mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
jack: client_thread_id should return the data thread
Add a function in data-loop to get the natvive thread and use that in client_thread_id() so that it returns the pthread of the data thread instead of the caller thread.
This commit is contained in:
parent
4b9b97841d
commit
e2d6545e77
3 changed files with 24 additions and 1 deletions
|
|
@ -3239,7 +3239,15 @@ int jack_get_client_pid (const char *name)
|
|||
SPA_EXPORT
|
||||
jack_native_thread_t jack_client_thread_id (jack_client_t *client)
|
||||
{
|
||||
return pthread_self();
|
||||
struct client *c = (struct client *) client;
|
||||
void *thr;
|
||||
|
||||
spa_return_val_if_fail(c != NULL, -EINVAL);
|
||||
|
||||
thr = pw_data_loop_get_thread(c->loop);
|
||||
if (thr == NULL)
|
||||
return pthread_self();
|
||||
return *(pthread_t*)thr;
|
||||
}
|
||||
|
||||
SPA_EXPORT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue