Import 2.3.25pre1
[davej-history.git] / include / linux / resource.h
blob5b38bb9e95b87da563d6203ad2227808fd6a9e79
1 #ifndef _LINUX_RESOURCE_H
2 #define _LINUX_RESOURCE_H
4 #include <linux/time.h>
6 /*
7 * Resource control/accounting header file for linux
8 */
11 * Definition of struct rusage taken from BSD 4.3 Reno
13 * We don't support all of these yet, but we might as well have them....
14 * Otherwise, each time we add new items, programs which depend on this
15 * structure will lose. This reduces the chances of that happening.
17 #define RUSAGE_SELF 0
18 #define RUSAGE_CHILDREN (-1)
19 #define RUSAGE_BOTH (-2) /* sys_wait4() uses this */
21 struct rusage {
22 struct timeval ru_utime; /* user time used */
23 struct timeval ru_stime; /* system time used */
24 long ru_maxrss; /* maximum resident set size */
25 long ru_ixrss; /* integral shared memory size */
26 long ru_idrss; /* integral unshared data size */
27 long ru_isrss; /* integral unshared stack size */
28 long ru_minflt; /* page reclaims */
29 long ru_majflt; /* page faults */
30 long ru_nswap; /* swaps */
31 long ru_inblock; /* block input operations */
32 long ru_oublock; /* block output operations */
33 long ru_msgsnd; /* messages sent */
34 long ru_msgrcv; /* messages received */
35 long ru_nsignals; /* signals received */
36 long ru_nvcsw; /* voluntary context switches */
37 long ru_nivcsw; /* involuntary " */
41 * SuS says limits have to be unsigned.
43 * Which makes a ton more sense anyway.
45 #define RLIM_INFINITY (~0UL)
47 struct rlimit {
48 unsigned long rlim_cur;
49 unsigned long rlim_max;
52 #define PRIO_MIN (-20)
53 #define PRIO_MAX 20
55 #define PRIO_PROCESS 0
56 #define PRIO_PGRP 1
57 #define PRIO_USER 2
60 * Due to binary compatibility, the actual resource numbers
61 * may be different for different linux versions..
63 #include <asm/resource.h>
65 #endif