KWin
Loading...
Searching...
No Matches
realtime.cpp
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "realtime.h"
8
9#include "config-kwin.h"
10
11#include <sched.h>
12
13namespace KWin
14{
15
17{
18#if HAVE_SCHED_RESET_ON_FORK
19 const int minPriority = sched_get_priority_min(SCHED_RR);
20 sched_param sp;
21 sp.sched_priority = minPriority;
22 sched_setscheduler(0, SCHED_RR | SCHED_RESET_ON_FORK, &sp);
23#endif
24}
25
26} // namespace KWin
void gainRealTime()
Definition realtime.cpp:16