143412Snewton/*	Derived from:
243412Snewton *	$NetBSD: svr4_resource.h,v 1.1 1998/11/28 21:53:02 christos Exp $	*/
343412Snewton
443412Snewton/*-
543412Snewton * Original copyright:
643412Snewton *
743412Snewton * Copyright (c) 1998 The NetBSD Foundation, Inc.
843412Snewton * All rights reserved.
943412Snewton *
1043412Snewton * This code is derived from software contributed to The NetBSD Foundation
1143412Snewton * by Christos Zoulas.
1243412Snewton *
1343412Snewton * Redistribution and use in source and binary forms, with or without
1443412Snewton * modification, are permitted provided that the following conditions
1543412Snewton * are met:
1643412Snewton * 1. Redistributions of source code must retain the above copyright
1743412Snewton *    notice, this list of conditions and the following disclaimer.
1843412Snewton * 2. Redistributions in binary form must reproduce the above copyright
1943412Snewton *    notice, this list of conditions and the following disclaimer in the
2043412Snewton *    documentation and/or other materials provided with the distribution.
2143412Snewton * 3. All advertising materials mentioning features or use of this software
2243412Snewton *    must display the following acknowledgement:
2343412Snewton *        This product includes software developed by the NetBSD
2443412Snewton *        Foundation, Inc. and its contributors.
2543412Snewton * 4. Neither the name of The NetBSD Foundation nor the names of its
2643412Snewton *    contributors may be used to endorse or promote products derived
2743412Snewton *    from this software without specific prior written permission.
2843412Snewton *
2943412Snewton * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
3043412Snewton * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
3143412Snewton * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
3243412Snewton * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
3343412Snewton * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
3443412Snewton * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3543412Snewton * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3643412Snewton * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
3743412Snewton * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3843412Snewton * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3943412Snewton * POSSIBILITY OF SUCH DAMAGE.
4049267Snewton *
4150477Speter * $FreeBSD$
4243412Snewton */
4343412Snewton
44139743Simp/*-
4543412Snewton * Portions of this code derived from software contributed to the
4643412Snewton * FreeBSD Project by Mark Newton.
4743412Snewton *
4843412Snewton * Copyright (c) 1999 Mark Newton
4943412Snewton * All rights reserved.
5043412Snewton *
5143412Snewton * Redistribution and use in source and binary forms, with or without
5243412Snewton * modification, are permitted provided that the following conditions
5343412Snewton * are met:
5443412Snewton * 1. Redistributions of source code must retain the above copyright
5543412Snewton *    notice, this list of conditions and the following disclaimer.
5643412Snewton * 2. Redistributions in binary form must reproduce the above copyright
5743412Snewton *    notice, this list of conditions and the following disclaimer in the
5843412Snewton *    documentation and/or other materials provided with the distribution.
5943412Snewton * 3. The name of the author may not be used to endorse or promote products
6043412Snewton *    derived from this software without specific prior written permission
6143412Snewton *
6243412Snewton * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
6343412Snewton * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
6443412Snewton * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
6543412Snewton * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
6643412Snewton * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
6743412Snewton * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
6843412Snewton * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
6943412Snewton * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
7043412Snewton * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
7143412Snewton * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7243412Snewton */
7343412Snewton
7443412Snewton#ifndef	_SVR4_RESOURCE_H_
7543412Snewton#define	_SVR4_RESOURCE_H_
7643412Snewton
7743412Snewton#define	SVR4_RLIMIT_CPU		0
7843412Snewton#define	SVR4_RLIMIT_FSIZE	1
7943412Snewton#define	SVR4_RLIMIT_DATA	2
8043412Snewton#define	SVR4_RLIMIT_STACK	3
8143412Snewton#define	SVR4_RLIMIT_CORE	4
8243412Snewton#define	SVR4_RLIMIT_NOFILE	5
8343412Snewton#define	SVR4_RLIMIT_VMEM	6
8443412Snewton#define	SVR4_RLIMIT_AS		SVR4_RLIMIT_VMEM
8543412Snewton#define	SVR4_RLIM_NLIMITS	7
8643412Snewton
8743412Snewtontypedef u_int32_t svr4_rlim_t;
8843412Snewton
8943412Snewton#define	SVR4_RLIM_SAVED_CUR	0x7ffffffd
9043412Snewton#define	SVR4_RLIM_SAVED_MAX	0x7ffffffe
9143412Snewton#define	SVR4_RLIM_INFINITY	0x7fffffff
9243412Snewton
9343412Snewtonstruct svr4_rlimit {
9443412Snewton	svr4_rlim_t	rlim_cur;
9543412Snewton	svr4_rlim_t	rlim_max;
9643412Snewton};
9743412Snewton
9843412Snewtontypedef u_int64_t svr4_rlim64_t;
9943412Snewton
10043412Snewton#define	SVR4_RLIM64_SAVED_CUR	((svr4_rlim64_t) -1)
10143412Snewton#define	SVR4_RLIM64_SAVED_MAX	((svr4_rlim64_t) -2)
10243412Snewton#define	SVR4_RLIM64_INFINITY	((svr4_rlim64_t) -3)
10343412Snewton
10443412Snewtonstruct svr4_rlimit64 {
10543412Snewton	svr4_rlim64_t	rlim_cur;
10643412Snewton	svr4_rlim64_t	rlim_max;
10743412Snewton};
10843412Snewton
10943412Snewton#endif /* !_SVR4_RESOURCE_H_ */
110