Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 4. Neither the name of the University nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * @(#)resource.h 8.4 (Berkeley) 1/9/95
30 * $FreeBSD: src/sys/sys/resource.h,v 1.29 2005/01/07 02:29:23 imp Exp $
32 * © Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
35 #ifndef _SYS_RESOURCE_H_
36 #define _SYS_RESOURCE_H_
38 #include <sys/cdefs.h>
39 #include <sys/_timeval.h>
40 #include <sys/_types.h>
44 #endif //__SYMBIAN32__
46 * Process priority specifications to get/setpriority.
51 #define PRIO_PROCESS 0
57 UPPER_LIMIT_PRIORITY_HIGHEST = -20,
58 LOWER_LIMIT_PRIORITY_HIGHEST = -16,
60 UPPER_LIMIT_PRIORITY_ABOVE_NORMAL = -15,
61 LOWER_LIMIT_PRIORITY_ABOVE_NORMAL = -6,
63 UPPER_LIMIT_PRIORITY_NORMAL = -5,
64 LOWER_LIMIT_PRIORITY_NORMAL = 4,
66 UPPER_LIMIT_PRIORITY_BELOW_NORMAL = 5,
67 LOWER_LIMIT_PRIORITY_BELOW_NORMAL = 14,
69 UPPER_LIMIT_PRIORITY_LOWEST = 15,
70 LOWER_LIMIT_PRIORITY_LOWEST = 20
72 #endif /* __SYMBIAN32__ */
74 * Resource utilization information.
77 * c - locked by proc mtx
78 * j - locked by sched_lock mtx
79 * n - not locked, lazy
83 #define RUSAGE_CHILDREN -1
86 struct timeval ru_utime; /* (n) user time used */
87 struct timeval ru_stime; /* (n) system time used */
88 long ru_maxrss; /* (j) max resident set size */
89 #define ru_first ru_ixrss
90 long ru_ixrss; /* (j) integral shared memory size */
91 long ru_idrss; /* (j) integral unshared data " */
92 long ru_isrss; /* (j) integral unshared stack " */
93 long ru_minflt; /* (c) page reclaims */
94 long ru_majflt; /* (c) page faults */
95 long ru_nswap; /* (c + j) swaps */
96 long ru_inblock; /* (n) block input operations */
97 long ru_oublock; /* (n) block output operations */
98 long ru_msgsnd; /* (n) messages sent */
99 long ru_msgrcv; /* (n) messages received */
100 long ru_nsignals; /* (c) signals received */
101 long ru_nvcsw; /* (j) voluntary context switches */
102 long ru_nivcsw; /* (j) involuntary " */
103 #define ru_last ru_nivcsw
109 #define RLIMIT_CPU 0 /* cpu time in milliseconds */
110 #define RLIMIT_FSIZE 1 /* maximum file size */
111 #define RLIMIT_DATA 2 /* data size */
112 #define RLIMIT_STACK 3 /* stack size */
113 #define RLIMIT_CORE 4 /* core file size */
114 #define RLIMIT_RSS 5 /* resident set size */
115 #define RLIMIT_MEMLOCK 6 /* locked-in-memory address space */
116 #define RLIMIT_NPROC 7 /* number of processes */
117 #define RLIMIT_NOFILE 8 /* number of open files */
118 #define RLIMIT_SBSIZE 9 /* maximum size of all socket buffers */
119 #define RLIMIT_VMEM 10 /* virtual process size (inclusive of mmap) */
120 #define RLIMIT_AS RLIMIT_VMEM /* standard name for RLIMIT_VMEM */
122 #define RLIM_NLIMITS 11 /* number of resource limits */
124 #define RLIM_INFINITY ((rlim_t)(((uint64_t)1 << 63) - 1))
125 /* XXX Missing: RLIM_SAVED_MAX, RLIM_SAVED_CUR */
129 * Resource limit string identifiers
133 static char *rlimit_ident[] = {
148 #ifndef _RLIM_T_DECLARED
149 typedef __rlim_t rlim_t;
150 #define _RLIM_T_DECLARED
154 rlim_t rlim_cur; /* current (soft) limit */
155 rlim_t rlim_max; /* maximum value for rlim_cur */
161 __int32_t rlim_cur; /* current (soft) limit */
162 __int32_t rlim_max; /* maximum value for rlim_cur */
177 #endif /* __BSD_VISIBLE */
181 extern struct loadavg averunnable;
182 extern long cp_time[CPUSTATES];
187 /* XXX 2nd arg to [gs]etpriority() should be an id_t */
188 IMPORT_C int getpriority(int, int);
189 IMPORT_C int setpriority(int, int, int);
193 #endif /* !_SYS_RESOURCE_H_ */