The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef _LINUX_RESOURCE_H |
| 13 | #define _LINUX_RESOURCE_H |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 14 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 15 | #include <linux/time.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 16 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | struct task_struct; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 18 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 19 | #define RUSAGE_SELF 0 |
| 20 | #define RUSAGE_CHILDREN (-1) |
| 21 | #define RUSAGE_BOTH (-2) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 22 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 23 | struct rusage { |
| 24 | struct timeval ru_utime; |
| 25 | struct timeval ru_stime; |
| 26 | long ru_maxrss; |
| 27 | long ru_ixrss; |
| 28 | long ru_idrss; |
| 29 | long ru_isrss; |
| 30 | long ru_minflt; |
| 31 | long ru_majflt; |
| 32 | long ru_nswap; |
| 33 | long ru_inblock; |
| 34 | long ru_oublock; |
| 35 | long ru_msgsnd; |
| 36 | long ru_msgrcv; |
| 37 | long ru_nsignals; |
| 38 | long ru_nvcsw; |
| 39 | long ru_nivcsw; |
| 40 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 41 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 42 | struct rlimit { |
| 43 | unsigned long rlim_cur; |
| 44 | unsigned long rlim_max; |
| 45 | }; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 46 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 47 | #define PRIO_MIN (-20) |
| 48 | #define PRIO_MAX 20 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 49 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 50 | #define PRIO_PROCESS 0 |
| 51 | #define PRIO_PGRP 1 |
| 52 | #define PRIO_USER 2 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 53 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 54 | #define _STK_LIM (8*1024*1024) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 55 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 56 | #define MLOCK_LIMIT (8 * PAGE_SIZE) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 57 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 58 | #include <asm/resource.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame] | 59 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 60 | #endif |