blob: d76c273286d245a8fa4f6455e1683347fba12e48 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_RESOURCE_H
20#define _UAPI_LINUX_RESOURCE_H
21#include <linux/time.h>
22#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define RUSAGE_SELF 0
Tao Baod7db5942015-01-28 10:07:51 -080024#define RUSAGE_CHILDREN (- 1)
25#define RUSAGE_BOTH (- 2)
Ben Cheng655a7c02013-10-16 16:09:24 -070026#define RUSAGE_THREAD 1
Ben Cheng655a7c02013-10-16 16:09:24 -070027struct rusage {
Tao Baod7db5942015-01-28 10:07:51 -080028 struct timeval ru_utime;
29 struct timeval ru_stime;
30 __kernel_long_t ru_maxrss;
Tao Baod7db5942015-01-28 10:07:51 -080031 __kernel_long_t ru_ixrss;
32 __kernel_long_t ru_idrss;
33 __kernel_long_t ru_isrss;
34 __kernel_long_t ru_minflt;
Tao Baod7db5942015-01-28 10:07:51 -080035 __kernel_long_t ru_majflt;
36 __kernel_long_t ru_nswap;
37 __kernel_long_t ru_inblock;
38 __kernel_long_t ru_oublock;
Tao Baod7db5942015-01-28 10:07:51 -080039 __kernel_long_t ru_msgsnd;
40 __kernel_long_t ru_msgrcv;
41 __kernel_long_t ru_nsignals;
42 __kernel_long_t ru_nvcsw;
Tao Baod7db5942015-01-28 10:07:51 -080043 __kernel_long_t ru_nivcsw;
Ben Cheng655a7c02013-10-16 16:09:24 -070044};
45struct rlimit {
Tao Baod7db5942015-01-28 10:07:51 -080046 __kernel_ulong_t rlim_cur;
Tao Baod7db5942015-01-28 10:07:51 -080047 __kernel_ulong_t rlim_max;
Ben Cheng655a7c02013-10-16 16:09:24 -070048};
49#define RLIM64_INFINITY (~0ULL)
50struct rlimit64 {
Tao Baod7db5942015-01-28 10:07:51 -080051 __u64 rlim_cur;
52 __u64 rlim_max;
Ben Cheng655a7c02013-10-16 16:09:24 -070053};
Tao Baod7db5942015-01-28 10:07:51 -080054#define PRIO_MIN (- 20)
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define PRIO_MAX 20
56#define PRIO_PROCESS 0
57#define PRIO_PGRP 1
58#define PRIO_USER 2
Tao Baod7db5942015-01-28 10:07:51 -080059#define _STK_LIM (8 * 1024 * 1024)
60#define MLOCK_LIMIT ((PAGE_SIZE > 64 * 1024) ? PAGE_SIZE : 64 * 1024)
Ben Cheng655a7c02013-10-16 16:09:24 -070061#include <asm/resource.h>
62#endif