Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bits
File: resource.h
/* Bit values & structures for resource limits. Linux version.
[0] Fix | Delete
Copyright (C) 1994-2018 Free Software Foundation, Inc.
[1] Fix | Delete
This file is part of the GNU C Library.
[2] Fix | Delete
[3] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[4] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[5] Fix | Delete
License as published by the Free Software Foundation; either
[6] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[7] Fix | Delete
[8] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[9] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[10] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[11] Fix | Delete
Lesser General Public License for more details.
[12] Fix | Delete
[13] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[14] Fix | Delete
License along with the GNU C Library; if not, see
[15] Fix | Delete
<http://www.gnu.org/licenses/>. */
[16] Fix | Delete
[17] Fix | Delete
#ifndef _SYS_RESOURCE_H
[18] Fix | Delete
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
[19] Fix | Delete
#endif
[20] Fix | Delete
[21] Fix | Delete
#include <bits/types.h>
[22] Fix | Delete
[23] Fix | Delete
/* Transmute defines to enumerations. The macro re-definitions are
[24] Fix | Delete
necessary because some programs want to test for operating system
[25] Fix | Delete
features with #ifdef RUSAGE_SELF. In ISO C the reflexive
[26] Fix | Delete
definition is a no-op. */
[27] Fix | Delete
[28] Fix | Delete
/* Kinds of resource limit. */
[29] Fix | Delete
enum __rlimit_resource
[30] Fix | Delete
{
[31] Fix | Delete
/* Per-process CPU limit, in seconds. */
[32] Fix | Delete
RLIMIT_CPU = 0,
[33] Fix | Delete
#define RLIMIT_CPU RLIMIT_CPU
[34] Fix | Delete
[35] Fix | Delete
/* Largest file that can be created, in bytes. */
[36] Fix | Delete
RLIMIT_FSIZE = 1,
[37] Fix | Delete
#define RLIMIT_FSIZE RLIMIT_FSIZE
[38] Fix | Delete
[39] Fix | Delete
/* Maximum size of data segment, in bytes. */
[40] Fix | Delete
RLIMIT_DATA = 2,
[41] Fix | Delete
#define RLIMIT_DATA RLIMIT_DATA
[42] Fix | Delete
[43] Fix | Delete
/* Maximum size of stack segment, in bytes. */
[44] Fix | Delete
RLIMIT_STACK = 3,
[45] Fix | Delete
#define RLIMIT_STACK RLIMIT_STACK
[46] Fix | Delete
[47] Fix | Delete
/* Largest core file that can be created, in bytes. */
[48] Fix | Delete
RLIMIT_CORE = 4,
[49] Fix | Delete
#define RLIMIT_CORE RLIMIT_CORE
[50] Fix | Delete
[51] Fix | Delete
/* Largest resident set size, in bytes.
[52] Fix | Delete
This affects swapping; processes that are exceeding their
[53] Fix | Delete
resident set size will be more likely to have physical memory
[54] Fix | Delete
taken from them. */
[55] Fix | Delete
__RLIMIT_RSS = 5,
[56] Fix | Delete
#define RLIMIT_RSS __RLIMIT_RSS
[57] Fix | Delete
[58] Fix | Delete
/* Number of open files. */
[59] Fix | Delete
RLIMIT_NOFILE = 7,
[60] Fix | Delete
__RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
[61] Fix | Delete
#define RLIMIT_NOFILE RLIMIT_NOFILE
[62] Fix | Delete
#define RLIMIT_OFILE __RLIMIT_OFILE
[63] Fix | Delete
[64] Fix | Delete
/* Address space limit. */
[65] Fix | Delete
RLIMIT_AS = 9,
[66] Fix | Delete
#define RLIMIT_AS RLIMIT_AS
[67] Fix | Delete
[68] Fix | Delete
/* Number of processes. */
[69] Fix | Delete
__RLIMIT_NPROC = 6,
[70] Fix | Delete
#define RLIMIT_NPROC __RLIMIT_NPROC
[71] Fix | Delete
[72] Fix | Delete
/* Locked-in-memory address space. */
[73] Fix | Delete
__RLIMIT_MEMLOCK = 8,
[74] Fix | Delete
#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
[75] Fix | Delete
[76] Fix | Delete
/* Maximum number of file locks. */
[77] Fix | Delete
__RLIMIT_LOCKS = 10,
[78] Fix | Delete
#define RLIMIT_LOCKS __RLIMIT_LOCKS
[79] Fix | Delete
[80] Fix | Delete
/* Maximum number of pending signals. */
[81] Fix | Delete
__RLIMIT_SIGPENDING = 11,
[82] Fix | Delete
#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING
[83] Fix | Delete
[84] Fix | Delete
/* Maximum bytes in POSIX message queues. */
[85] Fix | Delete
__RLIMIT_MSGQUEUE = 12,
[86] Fix | Delete
#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
[87] Fix | Delete
[88] Fix | Delete
/* Maximum nice priority allowed to raise to.
[89] Fix | Delete
Nice levels 19 .. -20 correspond to 0 .. 39
[90] Fix | Delete
values of this resource limit. */
[91] Fix | Delete
__RLIMIT_NICE = 13,
[92] Fix | Delete
#define RLIMIT_NICE __RLIMIT_NICE
[93] Fix | Delete
[94] Fix | Delete
/* Maximum realtime priority allowed for non-priviledged
[95] Fix | Delete
processes. */
[96] Fix | Delete
__RLIMIT_RTPRIO = 14,
[97] Fix | Delete
#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
[98] Fix | Delete
[99] Fix | Delete
/* Maximum CPU time in µs that a process scheduled under a real-time
[100] Fix | Delete
scheduling policy may consume without making a blocking system
[101] Fix | Delete
call before being forcibly descheduled. */
[102] Fix | Delete
__RLIMIT_RTTIME = 15,
[103] Fix | Delete
#define RLIMIT_RTTIME __RLIMIT_RTTIME
[104] Fix | Delete
[105] Fix | Delete
__RLIMIT_NLIMITS = 16,
[106] Fix | Delete
__RLIM_NLIMITS = __RLIMIT_NLIMITS
[107] Fix | Delete
#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
[108] Fix | Delete
#define RLIM_NLIMITS __RLIM_NLIMITS
[109] Fix | Delete
};
[110] Fix | Delete
[111] Fix | Delete
/* Value to indicate that there is no limit. */
[112] Fix | Delete
#ifndef __USE_FILE_OFFSET64
[113] Fix | Delete
# define RLIM_INFINITY ((__rlim_t) -1)
[114] Fix | Delete
#else
[115] Fix | Delete
# define RLIM_INFINITY 0xffffffffffffffffuLL
[116] Fix | Delete
#endif
[117] Fix | Delete
[118] Fix | Delete
#ifdef __USE_LARGEFILE64
[119] Fix | Delete
# define RLIM64_INFINITY 0xffffffffffffffffuLL
[120] Fix | Delete
#endif
[121] Fix | Delete
[122] Fix | Delete
/* We can represent all limits. */
[123] Fix | Delete
#define RLIM_SAVED_MAX RLIM_INFINITY
[124] Fix | Delete
#define RLIM_SAVED_CUR RLIM_INFINITY
[125] Fix | Delete
[126] Fix | Delete
[127] Fix | Delete
/* Type for resource quantity measurement. */
[128] Fix | Delete
#ifndef __USE_FILE_OFFSET64
[129] Fix | Delete
typedef __rlim_t rlim_t;
[130] Fix | Delete
#else
[131] Fix | Delete
typedef __rlim64_t rlim_t;
[132] Fix | Delete
#endif
[133] Fix | Delete
#ifdef __USE_LARGEFILE64
[134] Fix | Delete
typedef __rlim64_t rlim64_t;
[135] Fix | Delete
#endif
[136] Fix | Delete
[137] Fix | Delete
struct rlimit
[138] Fix | Delete
{
[139] Fix | Delete
/* The current (soft) limit. */
[140] Fix | Delete
rlim_t rlim_cur;
[141] Fix | Delete
/* The hard limit. */
[142] Fix | Delete
rlim_t rlim_max;
[143] Fix | Delete
};
[144] Fix | Delete
[145] Fix | Delete
#ifdef __USE_LARGEFILE64
[146] Fix | Delete
struct rlimit64
[147] Fix | Delete
{
[148] Fix | Delete
/* The current (soft) limit. */
[149] Fix | Delete
rlim64_t rlim_cur;
[150] Fix | Delete
/* The hard limit. */
[151] Fix | Delete
rlim64_t rlim_max;
[152] Fix | Delete
};
[153] Fix | Delete
#endif
[154] Fix | Delete
[155] Fix | Delete
/* Whose usage statistics do you want? */
[156] Fix | Delete
enum __rusage_who
[157] Fix | Delete
{
[158] Fix | Delete
/* The calling process. */
[159] Fix | Delete
RUSAGE_SELF = 0,
[160] Fix | Delete
#define RUSAGE_SELF RUSAGE_SELF
[161] Fix | Delete
[162] Fix | Delete
/* All of its terminated child processes. */
[163] Fix | Delete
RUSAGE_CHILDREN = -1
[164] Fix | Delete
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
[165] Fix | Delete
[166] Fix | Delete
#ifdef __USE_GNU
[167] Fix | Delete
,
[168] Fix | Delete
/* The calling thread. */
[169] Fix | Delete
RUSAGE_THREAD = 1
[170] Fix | Delete
# define RUSAGE_THREAD RUSAGE_THREAD
[171] Fix | Delete
/* Name for the same functionality on Solaris. */
[172] Fix | Delete
# define RUSAGE_LWP RUSAGE_THREAD
[173] Fix | Delete
#endif
[174] Fix | Delete
};
[175] Fix | Delete
[176] Fix | Delete
#include <bits/types/struct_timeval.h>
[177] Fix | Delete
#include <bits/types/struct_rusage.h>
[178] Fix | Delete
[179] Fix | Delete
/* Priority limits. */
[180] Fix | Delete
#define PRIO_MIN -20 /* Minimum priority a process can have. */
[181] Fix | Delete
#define PRIO_MAX 20 /* Maximum priority a process can have. */
[182] Fix | Delete
[183] Fix | Delete
/* The type of the WHICH argument to `getpriority' and `setpriority',
[184] Fix | Delete
indicating what flavor of entity the WHO argument specifies. */
[185] Fix | Delete
enum __priority_which
[186] Fix | Delete
{
[187] Fix | Delete
PRIO_PROCESS = 0, /* WHO is a process ID. */
[188] Fix | Delete
#define PRIO_PROCESS PRIO_PROCESS
[189] Fix | Delete
PRIO_PGRP = 1, /* WHO is a process group ID. */
[190] Fix | Delete
#define PRIO_PGRP PRIO_PGRP
[191] Fix | Delete
PRIO_USER = 2 /* WHO is a user ID. */
[192] Fix | Delete
#define PRIO_USER PRIO_USER
[193] Fix | Delete
};
[194] Fix | Delete
[195] Fix | Delete
[196] Fix | Delete
__BEGIN_DECLS
[197] Fix | Delete
[198] Fix | Delete
#ifdef __USE_GNU
[199] Fix | Delete
/* Modify and return resource limits of a process atomically. */
[200] Fix | Delete
# ifndef __USE_FILE_OFFSET64
[201] Fix | Delete
extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
[202] Fix | Delete
const struct rlimit *__new_limit,
[203] Fix | Delete
struct rlimit *__old_limit) __THROW;
[204] Fix | Delete
# else
[205] Fix | Delete
# ifdef __REDIRECT_NTH
[206] Fix | Delete
extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
[207] Fix | Delete
enum __rlimit_resource __resource,
[208] Fix | Delete
const struct rlimit *__new_limit,
[209] Fix | Delete
struct rlimit *__old_limit), prlimit64);
[210] Fix | Delete
# else
[211] Fix | Delete
# define prlimit prlimit64
[212] Fix | Delete
# endif
[213] Fix | Delete
# endif
[214] Fix | Delete
# ifdef __USE_LARGEFILE64
[215] Fix | Delete
extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
[216] Fix | Delete
const struct rlimit64 *__new_limit,
[217] Fix | Delete
struct rlimit64 *__old_limit) __THROW;
[218] Fix | Delete
# endif
[219] Fix | Delete
#endif
[220] Fix | Delete
[221] Fix | Delete
__END_DECLS
[222] Fix | Delete
[223] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function