Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/priocntl.h
+++ new/usr/src/uts/common/sys/priocntl.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 + *
23 25 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 26 * Use is subject to license terms.
25 27 */
26 28
27 29 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 30 /* All Rights Reserved */
29 31
30 32 #ifndef _SYS_PRIOCNTL_H
31 33 #define _SYS_PRIOCNTL_H
32 34
33 -#pragma ident "%Z%%M% %I% %E% SMI" /* from SVR4 1.6 */
34 -
35 35 #include <sys/types.h>
36 36 #include <sys/procset.h>
37 37
38 38 #ifdef __cplusplus
39 39 extern "C" {
40 40 #endif
41 41
42 42 #define PC_VERSION 1 /* First version of priocntl */
43 43
44 -#ifdef __STDC__
45 44 extern long priocntl(idtype_t, id_t, int, ...);
46 45 extern long priocntlset(procset_t *, int, ...);
47 -#else
48 -extern long priocntl(), priocntlset();
49 -#endif /* __STDC__ */
50 46
51 47 /*
52 48 * The following are the possible values of the command
53 49 * argument for the priocntl system call.
54 50 */
55 51
56 52 #define PC_GETCID 0 /* Get class ID */
57 53 #define PC_GETCLINFO 1 /* Get info about a configured class */
58 54 #define PC_SETPARMS 2 /* Set scheduling parameters */
59 55 #define PC_GETPARMS 3 /* Get scheduling parameters */
60 56 #define PC_ADMIN 4 /* Scheduler administration (used by */
61 57 /* dispadmin(1M), not for general use) */
62 58 #define PC_GETPRIRANGE 5 /* Get priority range for a class */
63 59 /* posix.4 scheduling, not for general use */
64 60 #define PC_DONICE 6 /* Set or get nice value */
65 61 #define PC_SETXPARMS 7 /* Set extended scheduling parameters */
66 62 #define PC_GETXPARMS 8 /* Get extended scheduling parameters */
67 63 #define PC_SETDFLCL 9 /* Set default class, not for general use */
68 64 #define PC_GETDFLCL 10 /* Get default class, not for general use */
69 65 #define PC_DOPRIO 11 /* Set or get priority, not for general use */
70 66
71 67 #define PC_CLNULL -1
72 68
73 69 #define PC_CLNMSZ 16
74 70 #define PC_CLINFOSZ (32 / sizeof (int))
75 71 #define PC_CLPARMSZ (32 / sizeof (int))
76 72
77 73 #define PC_GETNICE 0
78 74 #define PC_SETNICE 1
79 75
80 76 #define PC_GETPRIO 0
81 77 #define PC_SETPRIO 1
82 78
83 79 typedef struct pcinfo {
84 80 id_t pc_cid; /* class id */
85 81 char pc_clname[PC_CLNMSZ]; /* class name */
86 82 int pc_clinfo[PC_CLINFOSZ]; /* class information */
87 83 } pcinfo_t;
88 84
89 85 typedef struct pcparms {
90 86 id_t pc_cid; /* process class */
91 87 int pc_clparms[PC_CLPARMSZ]; /* class specific parameters */
92 88 } pcparms_t;
93 89
94 90 typedef struct pcnice {
95 91 int pc_val; /* nice value */
96 92 int pc_op; /* type of operation, set or get */
97 93 } pcnice_t;
98 94
99 95 typedef struct pcprio {
100 96 int pc_op; /* type of operation, set or get */
101 97 id_t pc_cid; /* class id */
102 98 int pc_val; /* priority value */
103 99 } pcprio_t;
104 100
105 101 /*
106 102 * The following is used by the priocntl(2) varargs interface (command
107 103 * codes: PC_SETXPARMS and PC_GETXPARMS).
108 104 */
109 105
110 106 #define PC_VAPARMCNT 8 /* maximal number of (key, value) pairs */
111 107 #define PC_KY_NULL 0 /* terminates the (key, value) pair chain */
112 108 #define PC_KY_CLNAME 1 /* get the class name of a process or LWP. */
113 109
114 110 typedef struct pc_vaparm {
115 111 int pc_key; /* describing key */
116 112 u_longlong_t pc_parm; /* associated parameter */
117 113 } pc_vaparm_t;
118 114
119 115 typedef struct pc_vaparms {
120 116 uint_t pc_vaparmscnt; /* # of (key, value) pairs */
121 117 pc_vaparm_t pc_parms[PC_VAPARMCNT]; /* parameter buffer */
122 118 } pc_vaparms_t;
123 119
124 120 #if defined(_SYSCALL32) && \
125 121 _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
126 122
127 123 /*
128 124 * These structures are needed by the 64-bit kernel on certain architectures
129 125 * to translate pc_vaparms_t/pc_vaparm_t data structures from 32-bit userland.
130 126 */
131 127 #pragma pack(4)
132 128
133 129 typedef struct {
134 130 int32_t pc_key; /* describing key */
135 131 uint64_t pc_parm; /* associated parameter */
136 132 } pc_vaparm32_t;
137 133
138 134 #pragma pack()
139 135
140 136 typedef struct {
141 137 uint32_t pc_vaparmscnt; /* # of (key, value) pairs */
142 138 pc_vaparm32_t pc_parms[PC_VAPARMCNT]; /* parameter buffer */
143 139 } pc_vaparms32_t;
144 140
145 141 #endif /* _SYSCALL32 && ... */
146 142
147 143 /*
148 144 * The following is used by libc for posix.4
149 145 * scheduler interfaces and is not for general use.
150 146 */
151 147
152 148 typedef struct pcpri {
153 149 id_t pc_cid; /* process class */
154 150 pri_t pc_clpmax; /* class priority max */
155 151 pri_t pc_clpmin; /* class priority min */
156 152 } pcpri_t;
157 153
158 154 /*
159 155 * The following is used by the dispadmin(1M) command for
160 156 * scheduler administration and is not for general use.
161 157 */
162 158
163 159 #ifdef _SYSCALL32
164 160 /* Data structure for ILP32 clients */
165 161 typedef struct pcadmin32 {
166 162 id32_t pc_cid;
167 163 caddr32_t pc_cladmin;
168 164 } pcadmin32_t;
169 165 #endif /* _SYSCALL32 */
170 166
171 167 typedef struct pcadmin {
172 168 id_t pc_cid;
173 169 caddr_t pc_cladmin;
174 170 } pcadmin_t;
175 171
176 172 #ifdef __cplusplus
177 173 }
178 174 #endif
179 175
180 176 #endif /* _SYS_PRIOCNTL_H */
↓ open down ↓ |
121 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX