Add a function for getting the current priority

This commit is contained in:
Robbert van der Helm
2021-01-22 00:44:43 +01:00
parent 58c687f9d7
commit 4812757f1a
2 changed files with 17 additions and 0 deletions
+7
View File
@@ -36,6 +36,13 @@ overload(Ts...) -> overload<Ts...>;
*/
boost::filesystem::path get_temporary_directory();
/**
* Get the current thread's scheduling priority if the thread is using
* `SCHED_FIFO`. Returns a nullopt of the calling thread is not under realtime
* scheduling.
*/
std::optional<int> get_scheduling_priority();
/**
* Set the scheduling policy to `SCHED_FIFO` with priority 10 for this process.
* We explicitly don't do this for wineserver itself since from my testing that