diff options
| author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
|---|---|---|
| committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
| commit | e05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch) | |
| tree | 31382cf1c7d62c03126448affb2fc86e8c4aaa8b /include/uapi/linux/resource.h | |
| parent | 3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff) | |
| parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'include/uapi/linux/resource.h')
| -rw-r--r-- | include/uapi/linux/resource.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/include/uapi/linux/resource.h b/include/uapi/linux/resource.h new file mode 100644 index 000000000000..e0ed28477f48 --- /dev/null +++ b/include/uapi/linux/resource.h | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | #ifndef _UAPI_LINUX_RESOURCE_H | ||
| 2 | #define _UAPI_LINUX_RESOURCE_H | ||
| 3 | |||
| 4 | #include <linux/time.h> | ||
| 5 | #include <linux/types.h> | ||
| 6 | |||
| 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 | |||
| 80 | #endif /* _UAPI_LINUX_RESOURCE_H */ | ||
