PipeWire  0.1.5.1
pw_rtkit Class Reference

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...
 

Detailed Description

RTKit helpers.

Member Function Documentation

◆ pw_rtkit_bus_free()

void pw_rtkit_bus_free ( struct pw_rtkit_bus *  system_bus)

Free an RTKit bus.

◆ pw_rtkit_bus_get_system()

struct pw_rtkit_bus * pw_rtkit_bus_get_system ( void  )

Get an RTKit bus.

◆ pw_rtkit_get_max_realtime_priority()

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.

◆ pw_rtkit_get_min_nice_level()

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.

◆ pw_rtkit_get_rttime_usec_max()

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.

◆ pw_rtkit_make_high_priority()

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.

◆ pw_rtkit_make_realtime()

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.


The documentation for this class was generated from the following file: