diff options
author | David Howells <dhowells@redhat.com> | 2012-10-13 05:46:48 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-10-13 05:46:48 -0400 |
commit | 607ca46e97a1b6594b29647d98a32d545c24bdff (patch) | |
tree | 30f4c0784bfddb57332cdc0678bd06d1e77fa185 /include/linux/resource.h | |
parent | 08cce05c5a91f5017f4edc9866cf026908c73f9f (diff) |
UAPI: (Scripted) Disintegrate include/linux
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'include/linux/resource.h')
-rw-r--r-- | include/linux/resource.h | 78 |
1 files changed, 1 insertions, 77 deletions
diff --git a/include/linux/resource.h b/include/linux/resource.h index d01c96c1966e..5bc3116e649c 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h | |||
@@ -1,82 +1,8 @@ | |||
1 | #ifndef _LINUX_RESOURCE_H | 1 | #ifndef _LINUX_RESOURCE_H |
2 | #define _LINUX_RESOURCE_H | 2 | #define _LINUX_RESOURCE_H |
3 | 3 | ||
4 | #include <linux/time.h> | 4 | #include <uapi/linux/resource.h> |
5 | #include <linux/types.h> | ||
6 | 5 | ||
7 | /* | ||
8 | * Resource control/accounting header file for linux | ||
9 | */ | ||
10 | |||
11 | /* | ||
12 | * Definition of struct rusage taken from BSD 4.3 Reno | ||
13 | * | ||
14 | * We don't support all of these yet, but we might as well have them.... | ||
15 | * Otherwise, each time we add new items, programs which depend on this | ||
16 | * structure will lose. This reduces the chances of that happening. | ||
17 | */ | ||
18 | #define RUSAGE_SELF 0 | ||
19 | #define RUSAGE_CHILDREN (-1) | ||
20 | #define RUSAGE_BOTH (-2) /* sys_wait4() uses this */ | ||
21 | #define RUSAGE_THREAD 1 /* only the calling thread */ | ||
22 | |||
23 | struct rusage { | ||
24 | struct timeval ru_utime; /* user time used */ | ||
25 | struct timeval ru_stime; /* system time used */ | ||
26 | long ru_maxrss; /* maximum resident set size */ | ||
27 | long ru_ixrss; /* integral shared memory size */ | ||
28 | long ru_idrss; /* integral unshared data size */ | ||
29 | long ru_isrss; /* integral unshared stack size */ | ||
30 | long ru_minflt; /* page reclaims */ | ||
31 | long ru_majflt; /* page faults */ | ||
32 | long ru_nswap; /* swaps */ | ||
33 | long ru_inblock; /* block input operations */ | ||
34 | long ru_oublock; /* block output operations */ | ||
35 | long ru_msgsnd; /* messages sent */ | ||
36 | long ru_msgrcv; /* messages received */ | ||
37 | long ru_nsignals; /* signals received */ | ||
38 | long ru_nvcsw; /* voluntary context switches */ | ||
39 | long ru_nivcsw; /* involuntary " */ | ||
40 | }; | ||
41 | |||
42 | struct rlimit { | ||
43 | unsigned long rlim_cur; | ||
44 | unsigned long rlim_max; | ||
45 | }; | ||
46 | |||
47 | #define RLIM64_INFINITY (~0ULL) | ||
48 | |||
49 | struct rlimit64 { | ||
50 | __u64 rlim_cur; | ||
51 | __u64 rlim_max; | ||
52 | }; | ||
53 | |||
54 | #define PRIO_MIN (-20) | ||
55 | #define PRIO_MAX 20 | ||
56 | |||
57 | #define PRIO_PROCESS 0 | ||
58 | #define PRIO_PGRP 1 | ||
59 | #define PRIO_USER 2 | ||
60 | |||
61 | /* | ||
62 | * Limit the stack by to some sane default: root can always | ||
63 | * increase this limit if needed.. 8MB seems reasonable. | ||
64 | */ | ||
65 | #define _STK_LIM (8*1024*1024) | ||
66 | |||
67 | /* | ||
68 | * GPG2 wants 64kB of mlocked memory, to make sure pass phrases | ||
69 | * and other sensitive information are never written to disk. | ||
70 | */ | ||
71 | #define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024) | ||
72 | |||
73 | /* | ||
74 | * Due to binary compatibility, the actual resource numbers | ||
75 | * may be different for different linux versions.. | ||
76 | */ | ||
77 | #include <asm/resource.h> | ||
78 | |||
79 | #ifdef __KERNEL__ | ||
80 | 6 | ||
81 | struct task_struct; | 7 | struct task_struct; |
82 | 8 | ||
@@ -84,6 +10,4 @@ int getrusage(struct task_struct *p, int who, struct rusage __user *ru); | |||
84 | int do_prlimit(struct task_struct *tsk, unsigned int resource, | 10 | int do_prlimit(struct task_struct *tsk, unsigned int resource, |
85 | struct rlimit *new_rlim, struct rlimit *old_rlim); | 11 | struct rlimit *new_rlim, struct rlimit *old_rlim); |
86 | 12 | ||
87 | #endif /* __KERNEL__ */ | ||
88 | |||
89 | #endif | 13 | #endif |