ALSA: ASoC: Sort Kconfig and Makefile entries for codecs
[zen-stable.git] / include / linux / resource.h
blobaaa423a6f3d9167ed4cd77c23053b271d1874631
1 #ifndef _LINUX_RESOURCE_H
2 #define _LINUX_RESOURCE_H
4 #include <linux/time.h>
6 struct task_struct;
8 /*
9 * Resource control/accounting header file for linux
13 * Definition of struct rusage taken from BSD 4.3 Reno
15 * We don't support all of these yet, but we might as well have them....
16 * Otherwise, each time we add new items, programs which depend on this
17 * structure will lose. This reduces the chances of that happening.
19 #define RUSAGE_SELF 0
20 #define RUSAGE_CHILDREN (-1)
21 #define RUSAGE_BOTH (-2) /* sys_wait4() uses this */
22 #define RUSAGE_THREAD 1 /* only the calling thread */
24 struct rusage {
25 struct timeval ru_utime; /* user time used */
26 struct timeval ru_stime; /* system time used */
27 long ru_maxrss; /* maximum resident set size */
28 long ru_ixrss; /* integral shared memory size */
29 long ru_idrss; /* integral unshared data size */
30 long ru_isrss; /* integral unshared stack size */
31 long ru_minflt; /* page reclaims */
32 long ru_majflt; /* page faults */
33 long ru_nswap; /* swaps */
34 long ru_inblock; /* block input operations */
35 long ru_oublock; /* block output operations */
36 long ru_msgsnd; /* messages sent */
37 long ru_msgrcv; /* messages received */
38 long ru_nsignals; /* signals received */
39 long ru_nvcsw; /* voluntary context switches */
40 long ru_nivcsw; /* involuntary " */
43 struct rlimit {
44 unsigned long rlim_cur;
45 unsigned long rlim_max;
48 #define PRIO_MIN (-20)
49 #define PRIO_MAX 20
51 #define PRIO_PROCESS 0
52 #define PRIO_PGRP 1
53 #define PRIO_USER 2
56 * Limit the stack by to some sane default: root can always
57 * increase this limit if needed.. 8MB seems reasonable.
59 #define _STK_LIM (8*1024*1024)
62 * GPG wants 32kB of mlocked memory, to make sure pass phrases
63 * and other sensitive information are never written to disk.
65 #define MLOCK_LIMIT (8 * PAGE_SIZE)
68 * Due to binary compatibility, the actual resource numbers
69 * may be different for different linux versions..
71 #include <asm/resource.h>
73 int getrusage(struct task_struct *p, int who, struct rusage __user *ru);
75 #endif