mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
jack: implement thread stop and kill
This commit is contained in:
parent
dde5a0dee8
commit
2abcc28762
1 changed files with 15 additions and 4 deletions
|
|
@ -3798,15 +3798,26 @@ int jack_drop_real_time_scheduling (jack_native_thread_t thread)
|
|||
SPA_EXPORT
|
||||
int jack_client_stop_thread(jack_client_t* client, jack_native_thread_t thread)
|
||||
{
|
||||
pw_log_warn(NAME" %p: not implemented %lu", client, thread);
|
||||
return -ENOTSUP;
|
||||
void* status;
|
||||
|
||||
if (thread == (jack_native_thread_t)NULL)
|
||||
return -1;
|
||||
|
||||
pthread_join(thread, &status);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPA_EXPORT
|
||||
int jack_client_kill_thread(jack_client_t* client, jack_native_thread_t thread)
|
||||
{
|
||||
pw_log_warn(NAME" %p: not implemented %lu", client, thread);
|
||||
return -ENOTSUP;
|
||||
void* status;
|
||||
|
||||
if (thread == (jack_native_thread_t)NULL)
|
||||
return -1;
|
||||
|
||||
pthread_cancel(thread);
|
||||
pthread_join(thread, &status);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SPA_EXPORT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue