[PATCH] core: Expose API to elevate a thread to realtime priority

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21.04.2018 06:21, Arun Raghavan wrote:
> This should make it easier for clients to elevate their audio threads to
> real time priority without having to dig through much through specific
> system internals.
> ---
>   src/modules/alsa/alsa-sink.c                 |   3 +-
>   src/modules/alsa/alsa-source.c               |   3 +-
>   src/modules/bluetooth/module-bluez5-device.c |   2 +-
>   src/modules/jack/module-jack-sink.c          |   4 +-
>   src/modules/jack/module-jack-source.c        |   4 +-
>   src/modules/macosx/module-coreaudio-device.c |   2 +-
>   src/modules/module-combine-sink.c            |   3 +-
>   src/modules/module-solaris.c                 |   2 +-
>   src/modules/module-waveout.c                 |   2 +-
>   src/modules/oss/module-oss.c                 |   2 +-
>   src/pulse/util.c                             | 176 +++++++++++++++++++++++++++
>   src/pulse/util.h                             |   3 +
>   src/pulsecore/core-util.c                    | 171 +-------------------------
>   src/pulsecore/core-util.h                    |   1 -
>   src/tests/lo-test-util.c                     |   2 +-
>   src/tests/rtstutter.c                        |   2 +-
>   16 files changed, 198 insertions(+), 184 deletions(-)
>
>
> diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h
> index e28b6aa7c..32579739b 100644
> --- a/src/pulsecore/core-util.h
> +++ b/src/pulsecore/core-util.h
> @@ -81,7 +81,6 @@ char *pa_strlcpy(char *b, const char *s, size_t l);
>   
>   char *pa_parent_dir(const char *fn);
>   
> -int pa_make_realtime(int rtprio);
>   int pa_raise_priority(int nice_level);
>   void pa_reset_priority(void);
>   

Should pa_raise_priority() and pa_reset_priority() also be moved to util.c?
I think, if a client can make a thread real time it should also be able to
reset the priority to normal.
Otherwise LGTM.



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux