mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
thread: add methods to get rt priority range
This commit is contained in:
parent
488150fac6
commit
dc5ed8f327
5 changed files with 98 additions and 47 deletions
|
|
@ -572,6 +572,17 @@ static int impl_join(void *data, struct pw_thread *thread, void **retval)
|
|||
return pthread_join(pt, retval);
|
||||
}
|
||||
|
||||
static int impl_get_rt_range(void *data, const struct spa_dict *props,
|
||||
int *min, int *max)
|
||||
{
|
||||
struct impl *impl = data;
|
||||
if (min)
|
||||
*min = 1;
|
||||
if (max)
|
||||
*max = pw_rtkit_get_max_realtime_priority(impl->system_bus);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static pid_t impl_gettid(struct impl *impl, pthread_t pt)
|
||||
{
|
||||
struct thread *thr;
|
||||
|
|
@ -645,6 +656,7 @@ static const struct pw_thread_utils_methods impl_thread_utils = {
|
|||
PW_VERSION_THREAD_UTILS_METHODS,
|
||||
.create = impl_create,
|
||||
.join = impl_join,
|
||||
.get_rt_range = impl_get_rt_range,
|
||||
.acquire_rt = impl_acquire_rt,
|
||||
.drop_rt = impl_drop_rt,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue