aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/resource.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/resource.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/resource.h')
-rw-r--r--include/linux/resource.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/include/linux/resource.h b/include/linux/resource.h
new file mode 100644
index 000000000000..21a86cb6acdb
--- /dev/null
+++ b/include/linux/resource.h
@@ -0,0 +1,70 @@
1#ifndef _LINUX_RESOURCE_H
2#define _LINUX_RESOURCE_H
3
4#include <linux/time.h>
5
6/*
7 * Resource control/accounting header file for linux
8 */
9
10/*
11 * Definition of struct rusage taken from BSD 4.3 Reno
12 *
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.
16 */
17#define RUSAGE_SELF 0
18#define RUSAGE_CHILDREN (-1)
19#define RUSAGE_BOTH (-2) /* sys_wait4() uses this */
20
21struct 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 " */
38};
39
40struct rlimit {
41 unsigned long rlim_cur;
42 unsigned long rlim_max;
43};
44
45#define PRIO_MIN (-20)
46#define PRIO_MAX 20
47
48#define PRIO_PROCESS 0
49#define PRIO_PGRP 1
50#define PRIO_USER 2
51
52/*
53 * Limit the stack by to some sane default: root can always
54 * increase this limit if needed.. 8MB seems reasonable.
55 */
56#define _STK_LIM (8*1024*1024)
57
58/*
59 * GPG wants 32kB of mlocked memory, to make sure pass phrases
60 * and other sensitive information are never written to disk.
61 */
62#define MLOCK_LIMIT (8 * PAGE_SIZE)
63
64/*
65 * Due to binary compatibility, the actual resource numbers
66 * may be different for different linux versions..
67 */
68#include <asm/resource.h>
69
70#endif