Rev 8402 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8402 | maxcodehac | 1 | #ifndef __dj_include_sys_resource_h_ |
2 | #define __dj_include_sys_resource_h_ |
||
3 | |||
4 | #ifdef __cplusplus |
||
5 | extern "C" { |
||
6 | #endif |
||
7 | |||
8 | #ifndef __dj_ENFORCE_ANSI_FREESTANDING |
||
9 | |||
10 | #ifndef __STRICT_ANSI__ |
||
11 | |||
12 | #ifndef _POSIX_SOURCE |
||
13 | |||
14 | #include |
||
15 | |||
16 | #define RUSAGE_SELF 0 /* calling process */ |
||
17 | #define RUSAGE_CHILDREN -1 /* terminated child processes */ |
||
18 | |||
19 | struct rusage { |
||
20 | struct timeval ru_utime; /* user time used */ |
||
21 | struct timeval ru_stime; /* system time used */ |
||
22 | long ru_maxrss; /* integral max resident set size */ |
||
23 | long ru_ixrss; /* integral shared text memory size */ |
||
24 | long ru_idrss; /* integral unshared data size */ |
||
25 | long ru_isrss; /* integral unshared stack size */ |
||
26 | long ru_minflt; /* page reclaims */ |
||
27 | long ru_majflt; /* page faults */ |
||
28 | long ru_nswap; /* swaps */ |
||
29 | long ru_inblock; /* block input operations */ |
||
30 | long ru_oublock; /* block output operations */ |
||
31 | long ru_msgsnd; /* messages sent */ |
||
32 | long ru_msgrcv; /* messages received */ |
||
33 | long ru_nsignals; /* signals received */ |
||
34 | long ru_nvcsw; /* voluntary context switches */ |
||
35 | long ru_nivcsw; /* involuntary context switches */ |
||
36 | }; |
||
37 | |||
38 | #define RLIMIT_CPU 0 /* cpu time in milliseconds */ |
||
39 | #define RLIMIT_FSIZE 1 /* maximum file size */ |
||
40 | #define RLIMIT_DATA 2 /* data size */ |
||
41 | #define RLIMIT_STACK 3 /* stack size */ |
||
42 | #define RLIMIT_CORE 4 /* core file size */ |
||
43 | #define RLIMIT_RSS 5 /* resident set size */ |
||
44 | #define RLIMIT_MEMLOCK 6 /* locked-in-memory address space */ |
||
45 | #define RLIMIT_NPROC 7 /* number of processes */ |
||
46 | #define RLIMIT_NOFILE 8 /* number of open files */ |
||
47 | |||
48 | #define RLIM_NLIMITS 9 /* number of resource limits */ |
||
49 | #define RLIM_INFINITY ((long) ((1UL << 31) - 1UL)) |
||
50 | |||
51 | struct rlimit { |
||
52 | long rlim_cur; /* current (soft) limit */ |
||
53 | long rlim_max; /* maximum value for rlim_cur */ |
||
54 | }; |
||
55 | |||
8411 | maxcodehac | 56 | /// STUB /// |
8402 | maxcodehac | 57 | int getrusage(int _who, struct rusage *_rusage) {}; |
58 | |||
59 | #endif /* !_POSIX_SOURCE */ |
||
60 | #endif /* !__STRICT_ANSI__ */ |
||
61 | #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ |
||
62 | |||
63 | #ifndef __dj_ENFORCE_FUNCTION_CALLS |
||
64 | #endif /* !__dj_ENFORCE_FUNCTION_CALLS */ |
||
65 | |||
66 | #ifdef __cplusplus |
||
67 | } |
||
68 | #endif |
||
69 | |||
70 | #endif /* !__dj_include_sys_resource_h_ */><> |