mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-01-04 11:08:56 -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
|
SPA_EXPORT
|
||||||
int jack_client_stop_thread(jack_client_t* client, jack_native_thread_t thread)
|
int jack_client_stop_thread(jack_client_t* client, jack_native_thread_t thread)
|
||||||
{
|
{
|
||||||
pw_log_warn(NAME" %p: not implemented %lu", client, thread);
|
void* status;
|
||||||
return -ENOTSUP;
|
|
||||||
|
if (thread == (jack_native_thread_t)NULL)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
pthread_join(thread, &status);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SPA_EXPORT
|
SPA_EXPORT
|
||||||
int jack_client_kill_thread(jack_client_t* client, jack_native_thread_t thread)
|
int jack_client_kill_thread(jack_client_t* client, jack_native_thread_t thread)
|
||||||
{
|
{
|
||||||
pw_log_warn(NAME" %p: not implemented %lu", client, thread);
|
void* status;
|
||||||
return -ENOTSUP;
|
|
||||||
|
if (thread == (jack_native_thread_t)NULL)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
pthread_cancel(thread);
|
||||||
|
pthread_join(thread, &status);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SPA_EXPORT
|
SPA_EXPORT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue