Debian Codegraph @

src/lib/rt-sched.c

raw symbols SCIP
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * rt-sched.h - sched_setattr() and sched_getattr() API
4 *
5 * (C) Dario Faggioli <[email protected]>, 2009, 2010
6 * Copyright (C) 2014 BMW Car IT GmbH, Daniel Wagner <[email protected]
7 */
8
9 /* This file is based on Dario Faggioli's libdl. Eventually it will be
10 replaced by a proper implemenation of this API. */
11
12 #include <unistd.h>
13 #include <sys/syscall.h>
14
15 #include "rt-sched.h"
16
17 int sched_setattr(pid_t pid,
18 const struct sched_attr *attr,
19 unsigned int flags)
20 {
21 return syscall(__NR_sched_setattr, pid, attr, flags);
22 }
23
24 int sched_getattr(pid_t pid,
25 struct sched_attr *attr,
26 unsigned int size,
27 unsigned int flags)
28 {
29 return syscall(__NR_sched_getattr, pid, attr, size, flags);
30 }