8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / ucbhead / sys / resource.h
blob9a03d755cc90ca78592a8086ccee7fbfe9e7fe00
1 /*
2 * CDDL HEADER START
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
7 * with the License.
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]
20 * CDDL HEADER END
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
33 * All Rights Reserved
35 * University Acknowledgment- Portions of this document are derived from
36 * software developed by the University of California, Berkeley, and its
37 * contributors.
40 #ifndef _SYS_RESOURCE_H
41 #define _SYS_RESOURCE_H
43 #pragma ident "%Z%%M% %I% %E% SMI"
45 #ifndef _SYS_RUSAGE_H
46 #include <sys/rusage.h>
47 #endif
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
54 * Process priority specifications to get/setpriority.
56 #define PRIO_MIN -20
57 #define PRIO_MAX 20
59 #define PRIO_PROCESS 0
60 #define PRIO_PGRP 1
61 #define PRIO_USER 2
64 * Resource limits
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
79 struct rlimit {
80 int rlim_cur; /* current (soft) limit */
81 int rlim_max; /* maximum value for rlim_cur */
84 #if defined(__STDC__)
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 *);
89 #else
90 extern int getpriority();
91 extern int setpriority();
92 extern int setrlimit();
93 extern int getrlimit();
94 #endif
96 #ifdef __cplusplus
98 #endif
100 #endif /* !_SYS_RESOURCE_H */