aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/cython/Cython/Includes/posix/resource.pxd
blob: 6d9bac292507f3cf59e2c5d0f954ef74b6ad96d1 (plain) (blame)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html 
 
from posix.time  cimport timeval
from posix.types cimport id_t 
 
cdef extern from "<sys/resource.h>" nogil:
 
    enum: PRIO_PROCESS 
    enum: PRIO_PGRP 
    enum: PRIO_USER 
 
    enum: RLIM_INFINITY 
    enum: RLIM_SAVED_MAX 
    enum: RLIM_SAVED_CUR 
 
    enum: RUSAGE_SELF 
    enum: RUSAGE_CHILDREN 
 
    enum: RLIMIT_CORE 
    enum: RLIMIT_CPU 
    enum: RLIMIT_DATA 
    enum: RLIMIT_FSIZE 
    enum: RLIMIT_NOFILE 
    enum: RLIMIT_STACK 
    enum: RLIMIT_AS 
 
    ctypedef unsigned long rlim_t 
 
    cdef struct rlimit: 
        rlim_t rlim_cur 
        rlim_t rlim_max 
 
    cdef struct rusage: 
        timeval ru_utime 
        timeval ru_stime 
        long    ru_maxrss 
        long    ru_ixrss 
        long    ru_idrss 
        long    ru_isrss 
        long    ru_minflt 
        long    ru_majflt 
        long    ru_nswap 
        long    ru_inblock 
        long    ru_oublock 
        long    ru_msgsnd 
        long    ru_msgrcv 
        long    ru_nsignals 
        long    ru_nvcsw 
        long    ru_nivcsw 
 
    int  getpriority(int, id_t) 
    int  getrlimit(int, rlimit *) 
    int  getrusage(int, rusage *) 
    int  setpriority(int, id_t, int) 
    int  setrlimit(int, const rlimit *)