File: init.h

package info (click to toggle)
python-psutil 7.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,312 kB
  • sloc: python: 19,411; ansic: 15,378; makefile: 465; javascript: 153; sh: 54
file content (29 lines) | stat: -rw-r--r-- 985 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include <Python.h>
#include <sys/syscall.h>  // __NR_*
#include <sched.h> // CPU_ALLOC

PyObject *psutil_disk_partitions(PyObject *self, PyObject *args);
PyObject *psutil_linux_sysinfo(PyObject *self, PyObject *args);
PyObject *psutil_net_if_duplex_speed(PyObject *self, PyObject *args);

// Linux >= 2.6.13
#if defined(__NR_ioprio_get) && defined(__NR_ioprio_set)
    #define PSUTIL_HAS_IOPRIO

    PyObject *psutil_proc_ioprio_get(PyObject *self, PyObject *args);
    PyObject *psutil_proc_ioprio_set(PyObject *self, PyObject *args);
#endif

// Should exist starting from CentOS 6 (year 2011).
#ifdef CPU_ALLOC
    #define PSUTIL_HAS_CPU_AFFINITY

    PyObject *psutil_proc_cpu_affinity_get(PyObject *self, PyObject *args);
    PyObject *psutil_proc_cpu_affinity_set(PyObject *self, PyObject *args);
#endif