diff --git a/src/common/utils.h b/src/common/utils.h index d1e31e1e..43b2da9f 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -88,18 +88,6 @@ boost::filesystem::path get_temporary_directory(); */ std::optional get_realtime_priority() noexcept; -/** - * Get the (soft) `RTTIME` resource limit, or the amount of time a `SCHED_FIFO` - * process may spend uninterrupted before being killed by the scheduler. A value - * of `-1`/`RLIM_INFINITY` means that there is no limit. If there was some error - * fetching this value, then a nullopt will be returned. - * - * This is useful to diagnose issues caused by PipeWire. They use rtkit at the - * moment, and both rtkit and PipeWire's rtkit module will enable a realtime CPU - * time limit with some low value. - */ -std::optional get_rttime_limit() noexcept; - /** * Set the scheduling policy to `SCHED_FIFO` with priority 5 for this process. * We explicitly don't do this for wineserver itself since from my testing that @@ -117,6 +105,18 @@ std::optional get_rttime_limit() noexcept; */ bool set_realtime_priority(bool sched_fifo, int priority = 5) noexcept; +/** + * Get the (soft) `RTTIME` resource limit, or the amount of time a `SCHED_FIFO` + * process may spend uninterrupted before being killed by the scheduler. A value + * of `-1`/`RLIM_INFINITY` means that there is no limit. If there was some error + * fetching this value, then a nullopt will be returned. + * + * This is useful to diagnose issues caused by PipeWire. They use rtkit at the + * moment, and both rtkit and PipeWire's rtkit module will enable a realtime CPU + * time limit with some low value. + */ +std::optional get_rttime_limit() noexcept; + /** * Check whether a process with the given PID is still active (and not a * zombie).