Scrap DEC Alpha support.
[dragonfly.git] / sys / emulation / svr4 / svr4_resource.h
1 /*      Derived from:
2  *      $NetBSD: svr4_resource.h,v 1.1 1998/11/28 21:53:02 christos Exp $       */
3
4 /*-
5  * Original copyright:
6  *
7  * Copyright (c) 1998 The NetBSD Foundation, Inc.
8  * All rights reserved.
9  *
10  * This code is derived from software contributed to The NetBSD Foundation
11  * by Christos Zoulas.
12  *
13  * Redistribution and use in source and binary forms, with or without
14  * modification, are permitted provided that the following conditions
15  * are met:
16  * 1. Redistributions of source code must retain the above copyright
17  *    notice, this list of conditions and the following disclaimer.
18  * 2. Redistributions in binary form must reproduce the above copyright
19  *    notice, this list of conditions and the following disclaimer in the
20  *    documentation and/or other materials provided with the distribution.
21  * 3. All advertising materials mentioning features or use of this software
22  *    must display the following acknowledgement:
23  *        This product includes software developed by the NetBSD
24  *        Foundation, Inc. and its contributors.
25  * 4. Neither the name of The NetBSD Foundation nor the names of its
26  *    contributors may be used to endorse or promote products derived
27  *    from this software without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
30  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
31  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
33  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39  * POSSIBILITY OF SUCH DAMAGE.
40  * 
41  * $FreeBSD: src/sys/svr4/svr4_resource.h,v 1.3 1999/08/28 00:51:19 peter Exp $
42  * $DragonFly: src/sys/emulation/svr4/Attic/svr4_resource.h,v 1.2 2003/06/17 04:28:57 dillon Exp $
43  */
44
45 /*
46  * Portions of this code derived from software contributed to the
47  * FreeBSD Project by Mark Newton.
48  * 
49  * Copyright (c) 1999 Mark Newton
50  * All rights reserved.
51  * 
52  * Redistribution and use in source and binary forms, with or without
53  * modification, are permitted provided that the following conditions
54  * are met:
55  * 1. Redistributions of source code must retain the above copyright
56  *    notice, this list of conditions and the following disclaimer.
57  * 2. Redistributions in binary form must reproduce the above copyright
58  *    notice, this list of conditions and the following disclaimer in the
59  *    documentation and/or other materials provided with the distribution.
60  * 3. The name of the author may not be used to endorse or promote products
61  *    derived from this software without specific prior written permission
62  *
63  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
64  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
65  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
66  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
67  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
68  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
69  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
70  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
71  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
72  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
73  */
74
75 #ifndef _SVR4_RESOURCE_H_
76 #define _SVR4_RESOURCE_H_
77
78 #define SVR4_RLIMIT_CPU         0
79 #define SVR4_RLIMIT_FSIZE       1
80 #define SVR4_RLIMIT_DATA        2
81 #define SVR4_RLIMIT_STACK       3
82 #define SVR4_RLIMIT_CORE        4
83 #define SVR4_RLIMIT_NOFILE      5
84 #define SVR4_RLIMIT_VMEM        6
85 #define SVR4_RLIMIT_AS          SVR4_RLIMIT_VMEM
86 #define SVR4_RLIM_NLIMITS       7
87
88 typedef u_int32_t svr4_rlim_t;
89
90 #define SVR4_RLIM_SAVED_CUR     0x7ffffffd
91 #define SVR4_RLIM_SAVED_MAX     0x7ffffffe
92 #define SVR4_RLIM_INFINITY      0x7fffffff
93
94 struct svr4_rlimit {
95         svr4_rlim_t     rlim_cur;
96         svr4_rlim_t     rlim_max;
97 };
98
99 typedef u_int64_t svr4_rlim64_t;
100
101 #define SVR4_RLIM64_SAVED_CUR   ((svr4_rlim64_t) -1)
102 #define SVR4_RLIM64_SAVED_MAX   ((svr4_rlim64_t) -2)
103 #define SVR4_RLIM64_INFINITY    ((svr4_rlim64_t) -3)
104
105 struct svr4_rlimit64 {
106         svr4_rlim64_t   rlim_cur;
107         svr4_rlim64_t   rlim_max;
108 };
109
110 #endif /* !_SVR4_RESOURCE_H_ */