Update copyright notices with scripts/update-copyrights
[glibc.git] / resource / sys / vlimit.h
blobf23033507e757762d6f2a1db192709bd7408220a
1 /* Copyright (C) 1991-2014 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
18 #ifndef _SYS_VLIMIT_H
19 #define _SYS_VLIMIT_H 1
21 #include <features.h>
23 __BEGIN_DECLS
25 /* This interface is obsolete, and is superseded by <sys/resource.h>. */
27 /* Kinds of resource limit. */
28 enum __vlimit_resource
30 /* Setting this non-zero makes it impossible to raise limits.
31 Only the super-use can set it to zero.
33 This is not implemented in recent versions of BSD, nor by
34 the GNU C library. */
35 LIM_NORAISE,
37 /* CPU time available for each process (seconds). */
38 LIM_CPU,
40 /* Largest file which can be created (bytes). */
41 LIM_FSIZE,
43 /* Maximum size of the data segment (bytes). */
44 LIM_DATA,
46 /* Maximum size of the stack segment (bytes). */
47 LIM_STACK,
49 /* Largest core file that will be created (bytes). */
50 LIM_CORE,
52 /* Resident set size (bytes). */
53 LIM_MAXRSS
56 /* This means no limit. */
57 #define INFINITY 0x7fffffff
60 /* Set the soft limit for RESOURCE to be VALUE.
61 Returns 0 for success, -1 for failure. */
62 extern int vlimit (enum __vlimit_resource __resource, int __value) __THROW;
65 __END_DECLS
67 #endif /* sys/vlimit.h */