svr4_resource.h revision 43412
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 42/* 43 * Portions of this code derived from software contributed to the 44 * FreeBSD Project by Mark Newton. 45 * 46 * Copyright (c) 1999 Mark Newton 47 * All rights reserved. 48 * 49 * Redistribution and use in source and binary forms, with or without 50 * modification, are permitted provided that the following conditions 51 * are met: 52 * 1. Redistributions of source code must retain the above copyright 53 * notice, this list of conditions and the following disclaimer. 54 * 2. Redistributions in binary form must reproduce the above copyright 55 * notice, this list of conditions and the following disclaimer in the 56 * documentation and/or other materials provided with the distribution. 57 * 3. The name of the author may not be used to endorse or promote products 58 * derived from this software without specific prior written permission 59 * 60 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 61 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 62 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 63 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 64 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 65 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 66 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 67 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 68 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 69 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 70 */ 71 72#ifndef _SVR4_RESOURCE_H_ 73#define _SVR4_RESOURCE_H_ 74 75#define SVR4_RLIMIT_CPU 0 76#define SVR4_RLIMIT_FSIZE 1 77#define SVR4_RLIMIT_DATA 2 78#define SVR4_RLIMIT_STACK 3 79#define SVR4_RLIMIT_CORE 4 80#define SVR4_RLIMIT_NOFILE 5 81#define SVR4_RLIMIT_VMEM 6 82#define SVR4_RLIMIT_AS SVR4_RLIMIT_VMEM 83#define SVR4_RLIM_NLIMITS 7 84 85typedef u_int32_t svr4_rlim_t; 86 87#define SVR4_RLIM_SAVED_CUR 0x7ffffffd 88#define SVR4_RLIM_SAVED_MAX 0x7ffffffe 89#define SVR4_RLIM_INFINITY 0x7fffffff 90 91struct svr4_rlimit { 92 svr4_rlim_t rlim_cur; 93 svr4_rlim_t rlim_max; 94}; 95 96typedef u_int64_t svr4_rlim64_t; 97 98#define SVR4_RLIM64_SAVED_CUR ((svr4_rlim64_t) -1) 99#define SVR4_RLIM64_SAVED_MAX ((svr4_rlim64_t) -2) 100#define SVR4_RLIM64_INFINITY ((svr4_rlim64_t) -3) 101 102struct svr4_rlimit64 { 103 svr4_rlim64_t rlim_cur; 104 svr4_rlim64_t rlim_max; 105}; 106 107#endif /* !_SVR4_RESOURCE_H_ */ 108