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