4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 1997 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
31 * University Copyright- Copyright (c) 1982, 1986, 1988
32 * The Regents of the University of California
35 * University Acknowledgment- Portions of this document are derived from
36 * software developed by the University of California, Berkeley, and its
40 #ifndef _SYS_RESOURCE_H
41 #define _SYS_RESOURCE_H
43 #pragma ident "%Z%%M% %I% %E% SMI"
46 #include <sys/rusage.h>
54 * Process priority specifications to get/setpriority.
59 #define PRIO_PROCESS 0
65 * RLIMIT_RSS removed so RLIMIT_NOFILE takes the value of 5
66 * to stay compatible with svr4
68 #define RLIMIT_CPU 0 /* cpu time in milliseconds */
69 #define RLIMIT_FSIZE 1 /* maximum file size */
70 #define RLIMIT_DATA 2 /* data size */
71 #define RLIMIT_STACK 3 /* stack size */
72 #define RLIMIT_CORE 4 /* core file size */
73 #define RLIMIT_NOFILE 5 /* maximum descriptor index + 1 */
75 #define RLIM_NLIMITS 7 /* number of resource limits */
77 #define RLIM_INFINITY 0x7fffffff
80 int rlim_cur
; /* current (soft) limit */
81 int rlim_max
; /* maximum value for rlim_cur */
85 extern int getpriority(int, int);
86 extern int setpriority(int, int, int);
87 extern int setrlimit(int, const struct rlimit
*);
88 extern int getrlimit(int, struct rlimit
*);
90 extern int getpriority();
91 extern int setpriority();
92 extern int setrlimit();
93 extern int getrlimit();
100 #endif /* !_SYS_RESOURCE_H */