Debian Codegraph @

psutil/arch/linux/init.h

raw
1 /*
2 * Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7 #include <Python.h>
8 #include <sys/syscall.h> // __NR_*
9 #include <sched.h> // CPU_ALLOC
10
11 PyObject *psutil_disk_partitions(PyObject *self, PyObject *args);
12 PyObject *psutil_linux_sysinfo(PyObject *self, PyObject *args);
13 PyObject *psutil_net_if_duplex_speed(PyObject *self, PyObject *args);
14
15 // Linux >= 2.6.13
16 #if defined(__NR_ioprio_get) && defined(__NR_ioprio_set)
17 #define PSUTIL_HAS_IOPRIO
18
19 PyObject *psutil_proc_ioprio_get(PyObject *self, PyObject *args);
20 PyObject *psutil_proc_ioprio_set(PyObject *self, PyObject *args);
21 #endif
22
23 // Should exist starting from CentOS 6 (year 2011).
24 #ifdef CPU_ALLOC
25 #define PSUTIL_HAS_CPU_AFFINITY
26
27 PyObject *psutil_proc_cpu_affinity_get(PyObject *self, PyObject *args);
28 PyObject *psutil_proc_cpu_affinity_set(PyObject *self, PyObject *args);
29 #endif