123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- #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 = 7,
- #define RLIMIT_RSS __RLIMIT_RSS
-
- RLIMIT_NOFILE = 5,
- __RLIMIT_OFILE = RLIMIT_NOFILE,
- #define RLIMIT_NOFILE RLIMIT_NOFILE
- #define RLIMIT_OFILE __RLIMIT_OFILE
-
- RLIMIT_AS = 6,
- #define RLIMIT_AS RLIMIT_AS
-
- __RLIMIT_NPROC = 8,
- #define RLIMIT_NPROC __RLIMIT_NPROC
-
- __RLIMIT_MEMLOCK = 9,
- #define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
-
- __RLIMIT_LOCKS = 10,
- #define RLIMIT_LOCKS __RLIMIT_LOCKS
-
- __RLIMIT_SIGPENDING = 11,
- #define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING
-
- __RLIMIT_MSGQUEUE = 12,
- #define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
-
- __RLIMIT_NICE = 13,
- #define RLIMIT_NICE __RLIMIT_NICE
-
- __RLIMIT_RTPRIO = 14,
- #define RLIMIT_RTPRIO __RLIMIT_RTPRIO
-
- __RLIMIT_RTTIME = 15,
- #define RLIMIT_RTTIME __RLIMIT_RTTIME
- __RLIMIT_NLIMITS = 16,
- __RLIM_NLIMITS = __RLIMIT_NLIMITS
- #define RLIMIT_NLIMITS __RLIMIT_NLIMITS
- #define RLIM_NLIMITS __RLIM_NLIMITS
- };
- #if _MIPS_SIM == _ABI64
- # define RLIM_INFINITY 0xffffffffffffffffUL
- # ifdef __USE_LARGEFILE64
- # define RLIM64_INFINITY 0xffffffffffffffffUL
- # endif
- #else
- # ifndef __USE_FILE_OFFSET64
- # define RLIM_INFINITY ((long int)(~0UL >> 1))
- # else
- # define RLIM_INFINITY 0xffffffffffffffffULL
- # endif
- # ifdef __USE_LARGEFILE64
- # define RLIM64_INFINITY 0xffffffffffffffffULL
- # endif
- #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
- #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 int ru_maxrss;
-
- long int ru_ixrss;
-
- long int ru_idrss;
-
- long int ru_isrss;
-
- long int ru_minflt;
-
- long int ru_majflt;
-
- long int ru_nswap;
-
- long int ru_inblock;
-
- long int ru_oublock;
-
- long int ru_msgsnd;
-
- long int ru_msgrcv;
-
- long int ru_nsignals;
-
- long int ru_nvcsw;
-
- long int 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
- };
|