Changeset 2060 for trunk/src/emx/include/sys/resource.h
- Timestamp:
- Jun 23, 2005, 8:00:41 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/sys/resource.h
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r2059 r2060 11 11 * notice, this list of conditions and the following disclaimer in the 12 12 * documentation and/or other materials provided with the distribution. 13 * 3. All advertising materials mentioning features or use of this software14 * must display the following acknowledgement:15 * This product includes software developed by the University of16 * California, Berkeley and its contributors.17 13 * 4. Neither the name of the University nor the names of its contributors 18 14 * may be used to endorse or promote products derived from this software … … 32 28 * 33 29 * @(#)resource.h 8.4 (Berkeley) 1/9/95 34 * $FreeBSD: src/sys/sys/resource.h,v 1. 19 2003/02/16 13:30:29 phkExp $30 * $FreeBSD: src/sys/sys/resource.h,v 1.23 2004/06/13 22:07:58 das Exp $ 35 31 */ 36 32 37 33 /** @file 38 * FreeBSD 5. 134 * FreeBSD 5.3 39 35 * @changed bird: get/setpriority takes id_t not int according to SuS. 40 36 */ … … 43 39 #define _SYS_RESOURCE_H_ 44 40 41 #include <sys/cdefs.h> 42 #include <sys/_timeval.h> 43 #include <sys/_types.h> 44 45 45 /* 46 46 * Process priority specifications to get/setpriority. … … 48 48 #define PRIO_MIN -20 49 49 #define PRIO_MAX 20 50 #ifdef _KERNEL51 #define PRIO_TOTAL (PRIO_MAX - PRIO_MIN)52 #endif /* _KERNEL */53 50 54 51 #define PRIO_PROCESS 0 … … 98 95 #define RLIMIT_SBSIZE 9 /* maximum size of all socket buffers */ 99 96 #define RLIMIT_VMEM 10 /* virtual process size (inclusive of mmap) */ 97 #define RLIMIT_AS RLIMIT_VMEM /* standard name for RLIMIT_VMEM */ 100 98 101 99 #define RLIM_NLIMITS 11 /* number of resource limits */ 102 100 103 101 #define RLIM_INFINITY ((rlim_t)(((u_quad_t)1 << 63) - 1)) 102 /* XXX Missing: RLIM_SAVED_MAX, RLIM_SAVED_CUR */ 104 103 105 104 … … 124 123 #endif 125 124 126 struct orlimit { 127 int32_t rlim_cur; /* current (soft) limit */ 128 int32_t rlim_max; /* maximum value for rlim_cur */ 129 }; 125 #ifndef _RLIM_T_DECLARED 126 typedef __rlim_t rlim_t; 127 #define _RLIM_T_DECLARED 128 #endif 130 129 131 130 struct rlimit { … … 134 133 }; 135 134 136 /* Load average structure. */ 135 #if __BSD_VISIBLE 136 137 struct orlimit { 138 __int32_t rlim_cur; /* current (soft) limit */ 139 __int32_t rlim_max; /* maximum value for rlim_cur */ 140 }; 141 137 142 struct loadavg { 138 fixpt_t ldavg[3];139 long fscale;143 __fixpt_t ldavg[3]; 144 long fscale; 140 145 }; 141 146 … … 147 152 #define CPUSTATES 5 148 153 154 #endif /* __BSD_VISIBLE */ 155 149 156 #ifdef _KERNEL 150 157 extern struct loadavg averunnable; 151 158 extern long cp_time[CPUSTATES]; 152 159 153 int dosetrlimit(struct thread *, u_int, struct rlimit *);160 int kern_setrlimit(struct thread *, u_int, struct rlimit *); 154 161 155 162 #else 156 #include <sys/cdefs.h>157 163 158 164 __BEGIN_DECLS 165 /* XXX 2nd arg to [gs]etpriority() should be an id_t */ 159 166 int getpriority(int, /*int*/ id_t); /* bird: SuS uses id_t */ 160 167 int getrlimit(int, struct rlimit *); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.