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