PipeWire
0.1.5.1
|
RTKit helpers. More...
Public Member Functions | |
struct pw_rtkit_bus * | pw_rtkit_bus_get_system (void) |
Get an RTKit bus. More... | |
void | pw_rtkit_bus_free (struct pw_rtkit_bus *system_bus) |
Free an RTKit bus. More... | |
int | pw_rtkit_make_realtime (struct pw_rtkit_bus *system_bus, pid_t thread, int priority) |
This is mostly equivalent to sched_setparam(thread, SCHED_RR, { .sched_priority = priority }). More... | |
int | pw_rtkit_make_high_priority (struct pw_rtkit_bus *system_bus, pid_t thread, int nice_level) |
This is mostly equivalent to setpriority(PRIO_PROCESS, thread, nice_level). More... | |
int | pw_rtkit_get_max_realtime_priority (struct pw_rtkit_bus *system_bus) |
Return the maximum value of realtime priority available. More... | |
int | pw_rtkit_get_min_nice_level (struct pw_rtkit_bus *system_bus, int *min_nice_level) |
Retreive the minimum value of nice level available. More... | |
long long | pw_rtkit_get_rttime_usec_max (struct pw_rtkit_bus *system_bus) |
Return the maximum value of RLIMIT_RTTIME to set before attempting a realtime request. More... | |
RTKit helpers.
void pw_rtkit_bus_free | ( | struct pw_rtkit_bus * | system_bus | ) |
Free an RTKit bus.
struct pw_rtkit_bus * pw_rtkit_bus_get_system | ( | void | ) |
Get an RTKit bus.
int pw_rtkit_get_max_realtime_priority | ( | struct pw_rtkit_bus * | system_bus | ) |
Return the maximum value of realtime priority available.
Realtime requests above this value will fail. A negative value is an errno style error code.
int pw_rtkit_get_min_nice_level | ( | struct pw_rtkit_bus * | system_bus, |
int * | min_nice_level | ||
) |
Retreive the minimum value of nice level available.
High prio requests below this value will fail. The returned value is a negative errno style error code, or 0 on success.
long long pw_rtkit_get_rttime_usec_max | ( | struct pw_rtkit_bus * | system_bus | ) |
Return the maximum value of RLIMIT_RTTIME to set before attempting a realtime request.
A negative value is an errno style error code.
int pw_rtkit_make_high_priority | ( | struct pw_rtkit_bus * | system_bus, |
pid_t | thread, | ||
int | nice_level | ||
) |
This is mostly equivalent to setpriority(PRIO_PROCESS, thread, nice_level).
'thread' needs to be a kernel thread id as returned by gettid(), not a pthread_t! If 'thread' is 0 the current thread is used. The returned value is a negative errno style error code, or 0 on success.
int pw_rtkit_make_realtime | ( | struct pw_rtkit_bus * | system_bus, |
pid_t | thread, | ||
int | priority | ||
) |
This is mostly equivalent to sched_setparam(thread, SCHED_RR, { .sched_priority = priority }).
'thread' needs to be a kernel thread id as returned by gettid(), not a pthread_t! If 'thread' is 0 the current thread is used. The returned value is a negative errno style error code, or 0 on success.