123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- #ifndef _SYS_RESOURCE_H
- # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
- #endif
- #include <bits/types.h>
- enum __rlimit_resource
- {
-
- RLIMIT_CPU = 0,
- #define RLIMIT_CPU RLIMIT_CPU
-
- RLIMIT_FSIZE = 1,
- #define RLIMIT_FSIZE RLIMIT_FSIZE
-
- RLIMIT_DATA = 2,
- #define RLIMIT_DATA RLIMIT_DATA
-
- RLIMIT_STACK = 3,
- #define RLIMIT_STACK RLIMIT_STACK
-
- RLIMIT_CORE = 4,
- #define RLIMIT_CORE RLIMIT_CORE
-
- RLIMIT_RSS = 5,
- #define RLIMIT_RSS RLIMIT_RSS
-
- RLIMIT_NOFILE = 7,
- RLIMIT_OFILE = RLIMIT_NOFILE,
- #define RLIMIT_NOFILE RLIMIT_NOFILE
- #define RLIMIT_OFILE RLIMIT_OFILE
-
- RLIMIT_AS = 9,
- #define RLIMIT_AS RLIMIT_AS
-
- RLIMIT_NPROC = 6,
- #define RLIMIT_NPROC RLIMIT_NPROC
-
- RLIMIT_MEMLOCK = 8,
- #define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
-
- RLIMIT_LOCKS = 10,
- #define RLIMIT_LOCKS RLIMIT_LOCKS
- RLIMIT_NLIMITS = 11,
- RLIM_NLIMITS = RLIMIT_NLIMITS
- #define RLIMIT_NLIMITS RLIMIT_NLIMITS
- #define RLIM_NLIMITS RLIM_NLIMITS
- };
- #ifndef __USE_FILE_OFFSET64
- # define RLIM_INFINITY ((unsigned long)(~0UL))
- #else
- # define RLIM_INFINITY 0xffffffffffffffffuLL
- #endif
- #ifdef __USE_LARGEFILE64
- # define RLIM64_INFINITY 0xffffffffffffffffuLL
- #endif
- #define RLIM_SAVED_MAX RLIM_INFINITY
- #define RLIM_SAVED_CUR RLIM_INFINITY
- #ifndef __USE_FILE_OFFSET64
- typedef __rlim_t rlim_t;
- #else
- typedef __rlim64_t rlim_t;
- #endif
- #ifdef __USE_LARGEFILE64
- typedef __rlim64_t rlim64_t;
- #endif
- struct rlimit
- {
-
- rlim_t rlim_cur;
-
- rlim_t rlim_max;
- };
- #ifdef __USE_LARGEFILE64
- struct rlimit64
- {
-
- rlim64_t rlim_cur;
-
- rlim64_t rlim_max;
- };
- #endif
- enum __rusage_who
- {
-
- RUSAGE_SELF = 0,
- #define RUSAGE_SELF RUSAGE_SELF
-
- RUSAGE_CHILDREN = -1,
- #define RUSAGE_CHILDREN RUSAGE_CHILDREN
-
- RUSAGE_BOTH = -2
- #define RUSAGE_BOTH RUSAGE_BOTH
- #ifdef __USE_GNU
- ,
-
- RUSAGE_THREAD = 1
- # define RUSAGE_THREAD RUSAGE_THREAD
-
- # define RUSAGE_LWP RUSAGE_THREAD
- #endif
- };
- #define __need_timeval
- #include <bits/time.h> /* For `struct timeval'. */
- struct rusage
- {
-
- struct timeval ru_utime;
-
- struct timeval ru_stime;
-
- long ru_maxrss;
-
- long ru_ixrss;
-
- long ru_idrss;
-
- long ru_isrss;
-
- long ru_minflt;
-
- long ru_majflt;
-
- long ru_nswap;
-
- long ru_inblock;
-
- long ru_oublock;
-
- long ru_msgsnd;
-
- long ru_msgrcv;
-
- long ru_nsignals;
-
- long ru_nvcsw;
-
- long ru_nivcsw;
- };
- #define PRIO_MIN -20
- #define PRIO_MAX 20
- enum __priority_which
- {
- PRIO_PROCESS = 0,
- #define PRIO_PROCESS PRIO_PROCESS
- PRIO_PGRP = 1,
- #define PRIO_PGRP PRIO_PGRP
- PRIO_USER = 2
- #define PRIO_USER PRIO_USER
- };
|