mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04: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
|
|
@ -56,7 +56,6 @@
|
|||
|
||||
#define JACK_DEFAULT_VIDEO_TYPE "32 bit float RGBA video"
|
||||
|
||||
#define JACK_SCHED_POLICY SCHED_FIFO
|
||||
/* use 512KB stack per thread - the default is way too high to be feasible
|
||||
* with mlockall() on many systems */
|
||||
#define THREAD_STACK 524288
|
||||
|
|
@ -5437,11 +5436,11 @@ SPA_EXPORT
|
|||
int jack_client_max_real_time_priority (jack_client_t *client)
|
||||
{
|
||||
struct client *c = (struct client *) client;
|
||||
int max;
|
||||
int min, max;
|
||||
|
||||
spa_return_val_if_fail(c != NULL, -1);
|
||||
|
||||
max = sched_get_priority_max(JACK_SCHED_POLICY);
|
||||
pw_thread_utils_get_rt_range(NULL, &min, &max);
|
||||
return SPA_MIN(max, c->rt_max) - 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue