blob: 347b52491b6f057c77d77de50e884fa2fe3797b7 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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 Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#include <linux/time.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080016
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017struct task_struct;
Ben Cheng4b29af02012-03-07 16:14:53 -080018
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080019#define RUSAGE_SELF 0
20#define RUSAGE_CHILDREN (-1)
21#define RUSAGE_BOTH (-2)
Ben Cheng4b29af02012-03-07 16:14:53 -080022
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080023struct 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 Cheng4b29af02012-03-07 16:14:53 -080041
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080042struct rlimit {
43 unsigned long rlim_cur;
44 unsigned long rlim_max;
45};
Ben Cheng4b29af02012-03-07 16:14:53 -080046
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080047#define PRIO_MIN (-20)
48#define PRIO_MAX 20
Ben Cheng4b29af02012-03-07 16:14:53 -080049
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080050#define PRIO_PROCESS 0
51#define PRIO_PGRP 1
52#define PRIO_USER 2
Ben Cheng4b29af02012-03-07 16:14:53 -080053
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054#define _STK_LIM (8*1024*1024)
Ben Cheng4b29af02012-03-07 16:14:53 -080055
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080056#define MLOCK_LIMIT (8 * PAGE_SIZE)
Ben Cheng4b29af02012-03-07 16:14:53 -080057
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080058#include <asm/resource.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080059
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080060#endif